From 96c9b7d85deba241b3bf77700274414363563a6b Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 20 Mar 2024 16:19:51 +0100 Subject: [PATCH 1/2] Refactor track paint functions and available pieces in RTD --- src/openrct2-ui/windows/Ride.cpp | 8 +- src/openrct2-ui/windows/RideConstruction.cpp | 82 +++++++++--------- src/openrct2/ride/RideConstruction.cpp | 13 +++ src/openrct2/ride/RideConstruction.h | 6 ++ src/openrct2/ride/RideData.cpp | 60 +++++++++---- src/openrct2/ride/RideData.h | 64 ++++++++------ src/openrct2/ride/TrackPaint.cpp | 17 +--- .../coaster/meta/AirPoweredVerticalCoaster.h | 11 +-- .../ride/coaster/meta/AlpineCoaster.h | 11 +-- .../ride/coaster/meta/BobsleighCoaster.h | 11 +-- .../coaster/meta/ClassicMiniRollerCoaster.h | 11 +-- .../meta/ClassicStandUpRollerCoaster.h | 11 +-- .../coaster/meta/ClassicWoodenRollerCoaster.h | 11 +-- .../coaster/meta/CompactInvertedCoaster.h | 11 +-- .../coaster/meta/CorkscrewRollerCoaster.h | 11 +-- .../ride/coaster/meta/FlyingRollerCoaster.h | 81 +++--------------- src/openrct2/ride/coaster/meta/GigaCoaster.h | 11 +-- .../coaster/meta/HeartlineTwisterCoaster.h | 11 +-- .../ride/coaster/meta/HybridCoaster.h | 11 +-- src/openrct2/ride/coaster/meta/HyperTwister.h | 11 +-- src/openrct2/ride/coaster/meta/Hypercoaster.h | 11 +-- .../coaster/meta/InvertedHairpinCoaster.h | 11 +-- .../coaster/meta/InvertedImpulseCoaster.h | 11 +-- .../ride/coaster/meta/InvertedRollerCoaster.h | 11 +-- .../ride/coaster/meta/JuniorRollerCoaster.h | 11 +-- .../coaster/meta/LIMLaunchedRollerCoaster.h | 11 +-- .../ride/coaster/meta/LayDownRollerCoaster.h | 84 ++++--------------- .../ride/coaster/meta/LoopingRollerCoaster.h | 11 +-- src/openrct2/ride/coaster/meta/MineRide.h | 11 +-- .../ride/coaster/meta/MineTrainCoaster.h | 11 +-- .../ride/coaster/meta/MiniRollerCoaster.h | 11 +-- .../ride/coaster/meta/MiniSuspendedCoaster.h | 11 +-- .../meta/MultiDimensionRollerCoaster.h | 79 +++-------------- .../coaster/meta/ReverseFreefallCoaster.h | 11 +-- .../ride/coaster/meta/ReverserRollerCoaster.h | 11 +-- .../coaster/meta/SideFrictionRollerCoaster.h | 11 +-- .../coaster/meta/SingleRailRollerCoaster.h | 11 +-- .../ride/coaster/meta/SpinningWildMouse.h | 11 +-- .../ride/coaster/meta/SpiralRollerCoaster.h | 11 +-- .../ride/coaster/meta/StandUpRollerCoaster.h | 11 +-- .../ride/coaster/meta/SteelWildMouse.h | 11 +-- src/openrct2/ride/coaster/meta/Steeplechase.h | 11 +-- .../coaster/meta/SuspendedSwingingCoaster.h | 11 +-- .../ride/coaster/meta/TwisterRollerCoaster.h | 11 +-- .../ride/coaster/meta/VerticalDropCoaster.h | 11 +-- src/openrct2/ride/coaster/meta/VirginiaReel.h | 11 +-- src/openrct2/ride/coaster/meta/WaterCoaster.h | 18 ++-- .../ride/coaster/meta/WoodenRollerCoaster.h | 11 +-- .../ride/coaster/meta/WoodenWildMouse.h | 11 +-- src/openrct2/ride/gentle/meta/CarRide.h | 11 +-- src/openrct2/ride/gentle/meta/Circus.h | 11 +-- src/openrct2/ride/gentle/meta/CrookedHouse.h | 11 +-- src/openrct2/ride/gentle/meta/Dodgems.h | 11 +-- src/openrct2/ride/gentle/meta/FerrisWheel.h | 11 +-- src/openrct2/ride/gentle/meta/FlyingSaucers.h | 11 +-- src/openrct2/ride/gentle/meta/GhostTrain.h | 11 +-- src/openrct2/ride/gentle/meta/HauntedHouse.h | 11 +-- src/openrct2/ride/gentle/meta/Maze.h | 11 +-- src/openrct2/ride/gentle/meta/MerryGoRound.h | 11 +-- src/openrct2/ride/gentle/meta/MiniGolf.h | 11 +-- .../ride/gentle/meta/MiniHelicopters.h | 11 +-- .../ride/gentle/meta/MonorailCycles.h | 11 +-- src/openrct2/ride/gentle/meta/MonsterTrucks.h | 11 +-- .../ride/gentle/meta/ObservationTower.h | 11 +-- src/openrct2/ride/gentle/meta/SpaceRings.h | 11 +-- src/openrct2/ride/gentle/meta/SpiralSlide.h | 11 +-- src/openrct2/ride/shops/meta/CashMachine.h | 11 +-- src/openrct2/ride/shops/meta/DrinkStall.h | 11 +-- src/openrct2/ride/shops/meta/FirstAid.h | 11 +-- src/openrct2/ride/shops/meta/FoodStall.h | 11 +-- .../ride/shops/meta/InformationKiosk.h | 11 +-- src/openrct2/ride/shops/meta/Shop.h | 11 +-- src/openrct2/ride/shops/meta/Toilets.h | 11 +-- src/openrct2/ride/thrill/meta/3DCinema.h | 11 +-- src/openrct2/ride/thrill/meta/Enterprise.h | 11 +-- src/openrct2/ride/thrill/meta/GoKarts.h | 11 +-- .../ride/thrill/meta/LaunchedFreefall.h | 11 +-- src/openrct2/ride/thrill/meta/MagicCarpet.h | 11 +-- .../ride/thrill/meta/MotionSimulator.h | 11 +-- src/openrct2/ride/thrill/meta/RotoDrop.h | 11 +-- .../ride/thrill/meta/SwingingInverterShip.h | 11 +-- src/openrct2/ride/thrill/meta/SwingingShip.h | 11 +-- src/openrct2/ride/thrill/meta/TopSpin.h | 11 +-- src/openrct2/ride/thrill/meta/Twist.h | 11 +-- src/openrct2/ride/transport/meta/Chairlift.h | 11 +-- src/openrct2/ride/transport/meta/Lift.h | 11 +-- .../ride/transport/meta/MiniatureRailway.h | 11 +-- src/openrct2/ride/transport/meta/Monorail.h | 11 +-- .../ride/transport/meta/SuspendedMonorail.h | 11 +-- src/openrct2/ride/water/meta/BoatHire.h | 11 +-- src/openrct2/ride/water/meta/DinghySlide.h | 18 ++-- src/openrct2/ride/water/meta/LogFlume.h | 11 +-- src/openrct2/ride/water/meta/RiverRafts.h | 11 +-- src/openrct2/ride/water/meta/RiverRapids.h | 11 +-- src/openrct2/ride/water/meta/SplashBoats.h | 11 +-- src/openrct2/ride/water/meta/SubmarineRide.h | 11 +-- src/openrct2/windows/_legacy.cpp | 6 +- 97 files changed, 722 insertions(+), 738 deletions(-) diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index d943d21522..93f2cfdd03 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -3377,10 +3377,10 @@ static_assert(std::size(RatingNames) == 6); | (1uLL << WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX)); // Sometimes, only one of the alternatives support lift hill pieces. Make sure to check both. - bool hasAlternativeType = ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE); - if (ride->GetRideTypeDescriptor().SupportsTrackPiece(TRACK_LIFT_HILL) - || (hasAlternativeType - && GetRideTypeDescriptor(ride->GetRideTypeDescriptor().AlternateType).SupportsTrackPiece(TRACK_LIFT_HILL))) + const auto& rtd = ride->GetRideTypeDescriptor(); + bool hasAlternativeType = rtd.HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE); + if (rtd.TrackPaintFunctions.Regular.SupportsTrackPiece(TRACK_LIFT_HILL) + || (hasAlternativeType && rtd.InvertedTrackPaintFunctions.SupportsTrackPiece(TRACK_LIFT_HILL))) { widgets[WIDX_LIFT_HILL_SPEED_LABEL].type = WindowWidgetType::Label; widgets[WIDX_LIFT_HILL_SPEED].type = WindowWidgetType::Spinner; diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index da0e4f13d1..0cae52afd7 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -181,12 +181,6 @@ static Widget _rideConstructionWidgets[] = { static void WindowRideConstructionMouseUpDemolishNextPiece(const CoordsXYZD& piecePos, int32_t type); - static int32_t RideGetAlternativeType(const Ride& ride) - { - return (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? ride.GetRideTypeDescriptor().AlternateType - : ride.type; - } - /* move to ride.c */ static void CloseRideWindowForConstruction(RideId rideId) { @@ -312,8 +306,8 @@ static Widget _rideConstructionWidgets[] = { { return; } - - int32_t rideType = RideGetAlternativeType(*currentRide); + const auto& rtd = currentRide->GetRideTypeDescriptor(); + const auto currentTrackDrawerDescriptor = getCurrentTrackDrawerDescriptor(rtd); uint64_t disabledWidgets = 0; @@ -863,7 +857,7 @@ static Widget _rideConstructionWidgets[] = { disabledWidgets |= (1uLL << WIDX_CONSTRUCT); } } - if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES)) + if (currentTrackDrawerDescriptor.HasCoveredPieces()) { disabledWidgets &= ~(1uLL << WIDX_BANKING_GROUPBOX); } @@ -1596,10 +1590,12 @@ static Widget _rideConstructionWidgets[] = { { return; } - int32_t rideType = RideGetAlternativeType(*currentRide); + + const auto& rtd = GetRideTypeDescriptor(currentRide->type); + auto trackDrawerDescriptor = getCurrentTrackDrawerDescriptor(rtd); hold_down_widgets = 0; - if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY) || !currentRide->HasStation()) + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY) || !currentRide->HasStation()) { widgets[WIDX_ENTRANCE_EXIT_GROUPBOX].type = WindowWidgetType::Empty; widgets[WIDX_ENTRANCE].type = WindowWidgetType::Empty; @@ -1677,7 +1673,7 @@ static Widget _rideConstructionWidgets[] = { widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP; widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP); widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP; - if (GetRideTypeDescriptor(rideType).SupportsTrackPiece(TRACK_REVERSE_FREEFALL)) + if (trackDrawerDescriptor.SupportsTrackPiece(TRACK_REVERSE_FREEFALL)) { widgets[WIDX_LEVEL].type = WindowWidgetType::FlatBtn; widgets[WIDX_SLOPE_UP].type = WindowWidgetType::FlatBtn; @@ -1699,7 +1695,7 @@ static Widget _rideConstructionWidgets[] = { { // Enable helix widgets[WIDX_SLOPE_DOWN_STEEP].type = WindowWidgetType::FlatBtn; - if (rideType != RIDE_TYPE_SPLASH_BOATS && rideType != RIDE_TYPE_RIVER_RAFTS) + if (currentRide->type != RIDE_TYPE_SPLASH_BOATS && currentRide->type != RIDE_TYPE_RIVER_RAFTS) widgets[WIDX_SLOPE_UP_STEEP].type = WindowWidgetType::FlatBtn; } } @@ -1865,7 +1861,6 @@ static Widget _rideConstructionWidgets[] = { || _selectedTrackType > TrackElemType::HighestAlias || _currentTrackCurve > (RideConstructionSpecialPieceSelected | TrackElemType::HighestAlias); - const auto& rtd = GetRideTypeDescriptor(rideType); bool rideHasSeatRotation = rtd.HasFlag(RIDE_TYPE_FLAG_HAS_SEAT_ROTATION); if (!trackHasSpeedSetting) @@ -1876,33 +1871,42 @@ static Widget _rideConstructionWidgets[] = { widgets[WIDX_BANK_STRAIGHT].type = WindowWidgetType::FlatBtn; widgets[WIDX_BANK_RIGHT].type = WindowWidgetType::FlatBtn; } - if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES)) + if (trackDrawerDescriptor.HasCoveredPieces()) { - if (rideType == RIDE_TYPE_WATER_COASTER) - { - widgets[WIDX_U_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_RC_TRACK); - widgets[WIDX_O_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_WATER_CHANNEL); - widgets[WIDX_U_TRACK].tooltip = STR_RIDE_CONSTRUCTION_STANDARD_RC_TRACK_TIP; - widgets[WIDX_O_TRACK].tooltip = STR_RIDE_CONSTRUCTION_WATER_CHANNEL_TIP; - if ((_currentTrackCurve < EnumValue(TrackCurve::LeftSmall) - || _currentTrackCurve == (RideConstructionSpecialPieceSelected | TrackElemType::SBendLeft) - || _currentTrackCurve == (RideConstructionSpecialPieceSelected | TrackElemType::SBendRight)) - && _currentTrackPitchEnd == TrackPitch::None && _currentTrackRollEnd == TrackRoll::None) - { - widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_TRACK_STYLE; - widgets[WIDX_U_TRACK].type = WindowWidgetType::FlatBtn; - widgets[WIDX_O_TRACK].type = WindowWidgetType::FlatBtn; - } - } - else + widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_TRACK_STYLE; + widgets[WIDX_U_TRACK].type = WindowWidgetType::FlatBtn; + widgets[WIDX_O_TRACK].type = WindowWidgetType::FlatBtn; + + if (rtd.Category == RIDE_CATEGORY_WATER) { widgets[WIDX_U_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK); widgets[WIDX_O_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK); widgets[WIDX_U_TRACK].tooltip = STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP; widgets[WIDX_O_TRACK].tooltip = STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP; - widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_TRACK_STYLE; - widgets[WIDX_U_TRACK].type = WindowWidgetType::FlatBtn; - widgets[WIDX_O_TRACK].type = WindowWidgetType::FlatBtn; + } + else + { + widgets[WIDX_U_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_RC_TRACK); + widgets[WIDX_O_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_WATER_CHANNEL); + widgets[WIDX_U_TRACK].tooltip = STR_RIDE_CONSTRUCTION_STANDARD_RC_TRACK_TIP; + widgets[WIDX_O_TRACK].tooltip = STR_RIDE_CONSTRUCTION_WATER_CHANNEL_TIP; + } + + // TODO: Read these from the TrackDrawerEntry + if (currentRide->type == RIDE_TYPE_WATER_COASTER) + { + const bool hasCoveredVersion = (_currentTrackCurve < EnumValue(TrackCurve::LeftSmall) + || _currentTrackCurve + == (RideConstructionSpecialPieceSelected | TrackElemType::SBendLeft) + || _currentTrackCurve + == (RideConstructionSpecialPieceSelected + | TrackElemType::SBendRight)) + && _currentTrackPitchEnd == TrackPitch::None && _currentTrackRollEnd == TrackRoll::None; + if (!hasCoveredVersion) + { + widgets[WIDX_U_TRACK].type = WindowWidgetType::Empty; + widgets[WIDX_O_TRACK].type = WindowWidgetType::Empty; + } } } } @@ -1986,7 +1990,7 @@ static Widget _rideConstructionWidgets[] = { widgets[WIDX_CONSTRUCT].type = WindowWidgetType::Empty; widgets[WIDX_DEMOLISH].type = WindowWidgetType::FlatBtn; widgets[WIDX_ROTATE].type = WindowWidgetType::Empty; - if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS)) + if (rtd.HasFlag(RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS)) { widgets[WIDX_PREVIOUS_SECTION].type = WindowWidgetType::Empty; widgets[WIDX_NEXT_SECTION].type = WindowWidgetType::Empty; @@ -2085,7 +2089,7 @@ static Widget _rideConstructionWidgets[] = { if (!_currentlyShowingBrakeOrBoosterSpeed) { - if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES)) + if (trackDrawerDescriptor.HasCoveredPieces()) { if (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_PIECES) { @@ -3067,8 +3071,8 @@ static Widget _rideConstructionWidgets[] = { if (rideEntry == nullptr) return; - int32_t rideType = RideGetAlternativeType(*ride); - UpdateEnabledRidePieces(rideType); + auto trackDrawerDescriptor = getCurrentTrackDrawerDescriptor(ride->GetRideTypeDescriptor()); + UpdateEnabledRidePieces(trackDrawerDescriptor); } /** diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index c133283391..242f5ff2fb 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -1668,3 +1668,16 @@ ResultWithMessage RideAreAllPossibleEntrancesAndExitsBuilt(const Ride& ride) } return { true }; } + +TrackDrawerDescriptor getCurrentTrackDrawerDescriptor(const RideTypeDescriptor& rtd) +{ + const bool isInverted = _currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE; + return getTrackDrawerDescriptor(rtd, isInverted); +} + +TrackDrawerEntry getCurrentTrackDrawerEntry(const RideTypeDescriptor& rtd) +{ + const bool isInverted = _currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE; + const bool isCovered = _currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_PIECES; + return getTrackDrawerEntry(rtd, isInverted, isCovered); +} diff --git a/src/openrct2/ride/RideConstruction.h b/src/openrct2/ride/RideConstruction.h index 96d783e702..a4679faa5a 100644 --- a/src/openrct2/ride/RideConstruction.h +++ b/src/openrct2/ride/RideConstruction.h @@ -22,6 +22,9 @@ using track_type_t = uint16_t; struct TileElement; struct CoordsXYE; +struct RideTypeDescriptor; +struct TrackDrawerDescriptor; +struct TrackDrawerEntry; enum class RideConstructionState : uint8_t { @@ -92,3 +95,6 @@ bool RideSelectBackwardsFromFront(); bool RideSelectForwardsFromBack(); void RideConstructionStart(Ride& ride); + +TrackDrawerDescriptor getCurrentTrackDrawerDescriptor(const RideTypeDescriptor& rtd); +TrackDrawerEntry getCurrentTrackDrawerEntry(const RideTypeDescriptor& rtd); diff --git a/src/openrct2/ride/RideData.cpp b/src/openrct2/ride/RideData.cpp index 9741aa7dc7..fd8fdc4cbc 100644 --- a/src/openrct2/ride/RideData.cpp +++ b/src/openrct2/ride/RideData.cpp @@ -307,15 +307,15 @@ constexpr RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT] = { /* RIDE_TYPE_SIDE_FRICTION_ROLLER_COASTER */ SideFrictionRollerCoasterRTD, /* RIDE_TYPE_STEEL_WILD_MOUSE */ SteelWildMouseRTD, /* RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER */ MultiDimensionRollerCoasterRTD, - /* RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER_ALT */ MultiDimensionRollerCoasterAltRTD, + /* RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER_ALT */ MultiDimensionRollerCoasterRTD, /* RIDE_TYPE_FLYING_ROLLER_COASTER */ FlyingRollerCoasterRTD, - /* RIDE_TYPE_FLYING_ROLLER_COASTER_ALT */ FlyingRollerCoasterAltRTD, + /* RIDE_TYPE_FLYING_ROLLER_COASTER_ALT */ FlyingRollerCoasterRTD, /* RIDE_TYPE_VIRGINIA_REEL */ VirginiaReelRTD, /* RIDE_TYPE_SPLASH_BOATS */ SplashBoatsRTD, /* RIDE_TYPE_MINI_HELICOPTERS */ MiniHelicoptersRTD, /* RIDE_TYPE_LAY_DOWN_ROLLER_COASTER */ LayDownRollerCoasterRTD, /* RIDE_TYPE_SUSPENDED_MONORAIL */ SuspendedMonorailRTD, - /* RIDE_TYPE_LAY_DOWN_ROLLER_COASTER_ALT */ LayDownRollerCoasterAltRTD, + /* RIDE_TYPE_LAY_DOWN_ROLLER_COASTER_ALT */ LayDownRollerCoasterRTD, /* RIDE_TYPE_REVERSER_ROLLER_COASTER */ ReverserRollerCoasterRTD, /* RIDE_TYPE_HEARTLINE_TWISTER_COASTER */ HeartlineTwisterCoasterRTD, /* RIDE_TYPE_MINI_GOLF */ MiniGolfRTD, @@ -359,17 +359,9 @@ bool RideTypeDescriptor::HasFlag(uint64_t flag) const return Flags & flag; } -void RideTypeDescriptor::GetAvailableTrackPieces(RideTrackGroup& res) const -{ - res = EnabledTrackPieces; - if (GetGameState().Cheats.EnableAllDrawableTrackPieces) - res |= ExtraTrackPieces; -} - bool RideTypeDescriptor::SupportsTrackPiece(const uint64_t trackPiece) const { - return EnabledTrackPieces.get(trackPiece) - || (GetGameState().Cheats.EnableAllDrawableTrackPieces && ExtraTrackPieces.get(trackPiece)); + return TrackPaintFunctions.Regular.SupportsTrackPiece(trackPiece); } ResearchCategory RideTypeDescriptor::GetResearchCategory() const @@ -408,9 +400,9 @@ bool IsTrackEnabled(int32_t trackFlagIndex) return _enabledRidePieces.get(trackFlagIndex); } -void UpdateEnabledRidePieces(ride_type_t rideType) +void UpdateEnabledRidePieces(TrackDrawerDescriptor trackDrawerDescriptor) { - GetRideTypeDescriptor(rideType).GetAvailableTrackPieces(_enabledRidePieces); + trackDrawerDescriptor.Regular.GetAvailableTrackPieces(_enabledRidePieces); if (!GetGameState().Cheats.EnableAllDrawableTrackPieces) { @@ -422,3 +414,43 @@ void UpdateDisabledRidePieces(const RideTrackGroup& res) { _disabledRidePieces = res; } + +void TrackDrawerEntry::GetAvailableTrackPieces(RideTrackGroup& res) const +{ + res = EnabledTrackPieces; + if (GetGameState().Cheats.EnableAllDrawableTrackPieces) + res |= ExtraTrackPieces; +} + +bool TrackDrawerEntry::SupportsTrackPiece(const uint64_t trackPiece) const +{ + return EnabledTrackPieces.get(trackPiece) + || (GetGameState().Cheats.EnableAllDrawableTrackPieces && ExtraTrackPieces.get(trackPiece)); +} + +bool TrackDrawerDescriptor::HasCoveredPieces() const +{ + return Covered.EnabledTrackPieces.count() > 0; +} + +bool TrackDrawerDescriptor::SupportsTrackPiece(const uint64_t trackPiece) const +{ + return Regular.SupportsTrackPiece(trackPiece); +} + +TrackDrawerDescriptor getTrackDrawerDescriptor(const RideTypeDescriptor& rtd, bool isInverted) +{ + return isInverted ? rtd.InvertedTrackPaintFunctions : rtd.TrackPaintFunctions; +} + +TrackDrawerEntry getTrackDrawerEntry(const RideTypeDescriptor& rtd, bool isInverted, bool isCovered) +{ + auto descriptor = getTrackDrawerDescriptor(rtd, isInverted); + + if (isCovered) + { + return descriptor.Covered; + } + + return descriptor.Regular; +} diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index 1addb4053a..f7369c8509 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -267,37 +267,50 @@ enum class RideConstructionWindowContext : uint8_t Maze, }; +struct TrackDrawerEntry +{ + TRACK_PAINT_FUNCTION_GETTER Drawer = nullptr; + /** rct2: 0x0097C468 (0 - 31) and 0x0097C5D4 (32 - 63) */ + RideTrackGroup EnabledTrackPieces{}; + // Pieces that this ride type _can_ draw, but are disabled because their vehicles lack the relevant sprites, + // or because they are not realistic for the ride type (e.g. LIM boosters in Mini Roller Coasters). + RideTrackGroup ExtraTrackPieces{}; + + void GetAvailableTrackPieces(RideTrackGroup& res) const; + bool SupportsTrackPiece(const uint64_t trackPiece) const; +}; + struct TrackDrawerDescriptor { - TRACK_PAINT_FUNCTION_GETTER Regular; - TRACK_PAINT_FUNCTION_GETTER Covered; + TrackDrawerEntry Regular{}; + TrackDrawerEntry Covered{}; - constexpr TrackDrawerDescriptor(TRACK_PAINT_FUNCTION_GETTER function) + constexpr TrackDrawerDescriptor() + { + } + + constexpr TrackDrawerDescriptor(TrackDrawerEntry function) : Regular(function) - , Covered(nullptr) { } - constexpr TrackDrawerDescriptor(TRACK_PAINT_FUNCTION_GETTER functionRegular, TRACK_PAINT_FUNCTION_GETTER functionCovered) - : Regular(functionRegular) - , Covered(functionCovered) + constexpr TrackDrawerDescriptor(TrackDrawerEntry entryRegular, TrackDrawerEntry entryCovered) + : Regular(entryRegular) + , Covered(entryCovered) { } + + bool HasCoveredPieces() const; + bool SupportsTrackPiece(const uint64_t trackPiece) const; }; struct RideTypeDescriptor { - uint8_t AlternateType; uint8_t Category; - /** rct2: 0x0097C468 (0 - 31) and 0x0097C5D4 (32 - 63) */ - RideTrackGroup EnabledTrackPieces; - // Pieces that this ride type _can_ draw, but are disabled because their vehicles lack the relevant sprites, - // or because they are not realistic for the ride type (e.g. LIM boosters in Mini Roller Coasters). - RideTrackGroup ExtraTrackPieces; - RideTrackGroup CoveredTrackPieces; /** rct2: 0x0097CC68 */ track_type_t StartTrackPiece; - TrackDrawerDescriptor TrackPaintFunctions; + TrackDrawerDescriptor TrackPaintFunctions{}; + TrackDrawerDescriptor InvertedTrackPaintFunctions{}; uint64_t Flags; /** rct2: 0x0097C8AC */ uint64_t RideModes; @@ -358,7 +371,7 @@ struct RideTypeDescriptor UpdateRideApproachVehicleWaypointsFunction UpdateRideApproachVehicleWaypoints = UpdateRideApproachVehicleWaypointsDefault; bool HasFlag(uint64_t flag) const; - void GetAvailableTrackPieces(RideTrackGroup& res) const; + /** @deprecated */ bool SupportsTrackPiece(const uint64_t trackPiece) const; ResearchCategory GetResearchCategory() const; bool SupportsRideMode(RideMode rideMode) const; @@ -388,9 +401,10 @@ enum ride_type_flags : uint64_t RIDE_TYPE_FLAG_HAS_DATA_LOGGING = (1uLL << 9), RIDE_TYPE_FLAG_HAS_DROPS = (1uLL << 10), RIDE_TYPE_FLAG_NO_TEST_MODE = (1uLL << 11), - RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES = (1uLL << 12), // used by rides with two varieties, like the u and o - // shapes of the dinghy slide and the dry and submerged - // track of the water coaster + RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES = (1uLL << 12), // set on rides with two varieties, + // like the u and o shapes of the dinghy slide + // and the dry and submerged track of the water + // coaster RIDE_TYPE_FLAG_NO_VEHICLES = (1uLL << 13), // used only by maze, spiral slide and shops RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS = (1uLL << 14), RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL = (1uLL << 16), // Set by flat rides where the vehicle is integral to the structure, like @@ -517,13 +531,10 @@ extern const StringId RideModeNames[EnumValue(RideMode::Count)]; // clang-format off constexpr RideTypeDescriptor DummyRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_NONE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(nullptr), + .TrackPaintFunctions = {}, + .InvertedTrackPaintFunctions = {}, .Flags = 0, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), .DefaultMode = RideMode::ContinuousCircuit, @@ -581,5 +592,8 @@ constexpr bool RideTypeIsValid(ObjectEntryIndex rideType) } bool IsTrackEnabled(int32_t trackFlagIndex); -void UpdateEnabledRidePieces(ride_type_t rideType); +void UpdateEnabledRidePieces(TrackDrawerDescriptor trackDrawerDescriptor); void UpdateDisabledRidePieces(const RideTrackGroup& res); + +TrackDrawerDescriptor getTrackDrawerDescriptor(const RideTypeDescriptor& rtd, bool isInverted); +TrackDrawerEntry getTrackDrawerEntry(const RideTypeDescriptor& rtd, bool isInverted = false, bool isCovered = false); diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index b4ad3fba81..57d28798f8 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -2309,21 +2309,12 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons } const auto& rtd = GetRideTypeDescriptor(trackElement.GetRideType()); - auto paintFunctions = rtd.TrackPaintFunctions; - TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter; - if (TrackElementIsCovered(trackType)) + const auto trackDrawerEntry = getTrackDrawerEntry(rtd, trackElement.IsInverted(), TrackElementIsCovered(trackType)); + + if (trackDrawerEntry.Drawer != nullptr) { trackType = UncoverTrackElement(trackType); - paintFunctionGetter = paintFunctions.Covered; - } - else - { - paintFunctionGetter = paintFunctions.Regular; - } - - if (paintFunctionGetter != nullptr) - { - TRACK_PAINT_FUNCTION paintFunction = paintFunctionGetter(trackType); + TRACK_PAINT_FUNCTION paintFunction = trackDrawerEntry.Drawer(trackType); if (paintFunction != nullptr) { paintFunction(session, *ride, trackSequence, direction, height, trackElement); diff --git a/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h b/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h index 545c79e8e5..5b7507a27b 100644 --- a/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h +++ b/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor AirPoweredVerticalCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL_STEEP, TRACK_LIFT_HILL_CURVE, TRACK_FLAT_ROLL_BANKING, TRACK_CURVE, TRACK_BRAKES, TRACK_REVERSE_FREEFALL, TRACK_SLOPE_TO_FLAT, TRACK_ON_RIDE_PHOTO}, - .ExtraTrackPieces = {TRACK_BOOSTER}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionAirPoweredVerticalRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionAirPoweredVerticalRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL_STEEP, TRACK_LIFT_HILL_CURVE, TRACK_FLAT_ROLL_BANKING, TRACK_CURVE, TRACK_BRAKES, TRACK_REVERSE_FREEFALL, TRACK_SLOPE_TO_FLAT, TRACK_ON_RIDE_PHOTO}, + .ExtraTrackPieces = {TRACK_BOOSTER}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), .DefaultMode = RideMode::PoweredLaunchPasstrough, diff --git a/src/openrct2/ride/coaster/meta/AlpineCoaster.h b/src/openrct2/ride/coaster/meta/AlpineCoaster.h index 595ca0a05b..ba4c9f65a2 100644 --- a/src/openrct2/ride/coaster/meta/AlpineCoaster.h +++ b/src/openrct2/ride/coaster/meta/AlpineCoaster.h @@ -15,13 +15,14 @@ // clang-format off constexpr RideTypeDescriptor AlpineCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF}, - .ExtraTrackPieces = {TRACK_HELIX_UP_BANKED_HALF}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(AlpineRC::GetTrackPaintFunction), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = AlpineRC::GetTrackPaintFunction, + .EnabledTrackPieces = { TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF}, + .ExtraTrackPieces = {TRACK_HELIX_UP_BANKED_HALF}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_CHECK_FOR_STALLING | RIDE_TYPE_FLAG_HAS_TRACK diff --git a/src/openrct2/ride/coaster/meta/BobsleighCoaster.h b/src/openrct2/ride/coaster/meta/BobsleighCoaster.h index 5ac10844ca..e76452bca8 100644 --- a/src/openrct2/ride/coaster/meta/BobsleighCoaster.h +++ b/src/openrct2/ride/coaster/meta/BobsleighCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor BobsleighCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE,TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES,TRACK_BLOCK_BRAKES, TRACK_ON_RIDE_PHOTO}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionBobsleighRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionBobsleighRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE,TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES,TRACK_BLOCK_BRAKES, TRACK_ON_RIDE_PHOTO}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS, diff --git a/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h index c655ac5709..a5ed68829b 100644 --- a/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor ClassicMiniRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_CURVE, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_BLOCK_BRAKES, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_ON_RIDE_PHOTO}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionJuniorRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionJuniorRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_CURVE, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_BLOCK_BRAKES, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_ON_RIDE_PHOTO}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h index 2807d3068e..694fd7ae1b 100644 --- a/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicStandUpRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor ClassicStandUpRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionClassicStandUpRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionClassicStandUpRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h index f82f1c4d00..a2551d411a 100644 --- a/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor ClassicWoodenRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_WATER_SPLASH, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = 0, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionClassicWoodenRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionClassicWoodenRC, + .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_WATER_SPLASH, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h b/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h index 1775bb3c28..481705ef07 100644 --- a/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h +++ b/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor CompactInvertedCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_TWIST, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCompactInvertedRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCompactInvertedRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_TWIST, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED, diff --git a/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h b/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h index e0abe63d0f..875c550128 100644 --- a/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES,TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_TWIST}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCorkscrewRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCorkscrewRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES,TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_TWIST}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h b/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h index ca4ddbeb9b..0c7e6f443c 100644 --- a/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h @@ -18,13 +18,18 @@ // Non-inverted variant constexpr RideTypeDescriptor FlyingRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_FLYING_ROLLER_COASTER_ALT, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_QUARTER_LOOP_UNINVERTED_UP, TRACK_FLYING_LARGE_HALF_LOOP_UNINVERTED_UP, TRACK_SLOPE_VERTICAL, TRACK_SLOPE_CURVE_BANKED, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_FLYING_LARGE_HALF_LOOP_UNINVERTED_DOWN, TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_STATION_END, TRACK_VERTICAL_LOOP, TRACK_POWERED_LIFT}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionFlyingRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionFlyingRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_QUARTER_LOOP_UNINVERTED_UP, TRACK_FLYING_LARGE_HALF_LOOP_UNINVERTED_UP, TRACK_SLOPE_VERTICAL, TRACK_SLOPE_CURVE_BANKED, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_FLYING_LARGE_HALF_LOOP_UNINVERTED_DOWN, TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_STATION_END, TRACK_VERTICAL_LOOP, TRACK_POWERED_LIFT}, + }), + .InvertedTrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionFlyingRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_INLINE_TWIST_INVERTED, TRACK_FLYING_HALF_LOOP_INVERTED_DOWN, TRACK_QUARTER_LOOP_INVERTED_DOWN, TRACK_FLYING_LARGE_HALF_LOOP_INVERTED_DOWN, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_FLYING_LARGE_HALF_LOOP_INVERTED_UP, TRACK_FLYING_HALF_LOOP_INVERTED_UP}, + }), .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | @@ -86,70 +91,4 @@ constexpr RideTypeDescriptor FlyingRollerCoasterRTD = }, }, }; - -// Inverted variant -constexpr RideTypeDescriptor FlyingRollerCoasterAltRTD = -{ - .AlternateType = RIDE_TYPE_NULL, - .Category = RIDE_CATEGORY_NONE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_INLINE_TWIST_INVERTED, TRACK_FLYING_HALF_LOOP_INVERTED_DOWN, TRACK_QUARTER_LOOP_INVERTED_DOWN, TRACK_FLYING_LARGE_HALF_LOOP_INVERTED_DOWN, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_FLYING_LARGE_HALF_LOOP_INVERTED_UP, TRACK_FLYING_HALF_LOOP_INVERTED_UP}, - .CoveredTrackPieces = {}, - .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(nullptr), - .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | - RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAG_START_CONSTRUCTION_INVERTED, - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, - .Naming = { STR_RIDE_NAME_3A, STR_RIDE_DESCRIPTION_UNKNOWN }, - .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, - .EnumName = nameof(RIDE_TYPE_FLYING_ROLLER_COASTER_ALT), - .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), - .Heights = { 30, 24, 8, 11, }, - .MaxMass = 35, - .LiftData = { OpenRCT2::Audio::SoundId::LiftBM, 4, 6 }, - .RatingsMultipliers = { 50, 30, 10 }, - .UpkeepCosts = { 49, 20, 90, 11, 3, 15 }, - .BuildCosts = { 62.50_GBP, 2.50_GBP, 50, }, - .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, - .PhotoItem = ShopItem::Photo2, - .BonusValue = 100, - .ColourPresets = TRACK_COLOUR_PRESETS( - { COLOUR_OLIVE_GREEN, COLOUR_OLIVE_GREEN, COLOUR_TEAL }, - { COLOUR_TEAL, COLOUR_TEAL, COLOUR_BORDEAUX_RED }, - { COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_DARK_PURPLE }, - ), - .ColourPreview = { SPR_RIDE_DESIGN_PREVIEW_FLYING_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_FLYING_ROLLER_COASTER_SUPPORTS }, - .ColourKey = RideColourKey::Ride, - .Name = "flying_rc_alt", - .RatingsData = - { - RatingsCalculationType::Normal, - { RIDE_RATING(4, 35), RIDE_RATING(1, 85), RIDE_RATING(4, 33) }, - 17, - -1, - false, - { - { RatingsModifierType::BonusLength, 6000, 764, 0, 0 }, - { RatingsModifierType::BonusSynchronisation, 0, RIDE_RATING(0, 40), RIDE_RATING(0, 05), 0 }, - { RatingsModifierType::BonusTrainLength, 0, 187245, 0, 0 }, - { RatingsModifierType::BonusMaxSpeed, 0, 44281, 88562, 35424 }, - { RatingsModifierType::BonusAverageSpeed, 0, 291271, 436906, 0 }, - { RatingsModifierType::BonusDuration, 150, 26214, 0, 0 }, - { RatingsModifierType::BonusGForces, 0, 24576, 38130, 49648 }, - { RatingsModifierType::BonusTurns, 0, 26749, 34767, 45749 }, - { RatingsModifierType::BonusDrops, 0, 29127, 46811, 49152 }, - { RatingsModifierType::BonusSheltered, 0, 15420, 32768, 35108 }, - { RatingsModifierType::BonusProximity, 0, 20130, 0, 0 }, - { RatingsModifierType::BonusScenery, 0, 6693, 0, 0 }, - { RatingsModifierType::RequirementInversions, 1, 2, 1, 1 }, - { RatingsModifierType::RequirementMaxSpeed, 0xA0000, 2, 1, 1 }, - { RatingsModifierType::RequirementNegativeGs, FIXED_2DP(0, 40), 2, 1, 1 }, - { RatingsModifierType::RequirementNumDrops, 2, 2, 1, 1 }, - { RatingsModifierType::PenaltyLateralGs, 0, 24576, 38130, 49648 }, - }, - }, -}; // clang-format on diff --git a/src/openrct2/ride/coaster/meta/GigaCoaster.h b/src/openrct2/ride/coaster/meta/GigaCoaster.h index 6107937f5d..672f131bd1 100644 --- a/src/openrct2/ride/coaster/meta/GigaCoaster.h +++ b/src/openrct2/ride/coaster/meta/GigaCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor GigaCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_LIFT_HILL_CABLE, TRACK_BOOSTER, TRACK_POWERED_LIFT, TRACK_SLOPE_CURVE_BANKED, TRACK_SLOPE_CURVE_LARGE, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES, TRACK_SLOPE_VERTICAL, TRACK_CURVE_VERTICAL}, - .ExtraTrackPieces = {TRACK_BARREL_ROLL, TRACK_QUARTER_LOOP, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE, TRACK_VERTICAL_LOOP, TRACK_CORKSCREW, TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionGigaRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionGigaRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_LIFT_HILL_CABLE, TRACK_BOOSTER, TRACK_POWERED_LIFT, TRACK_SLOPE_CURVE_BANKED, TRACK_SLOPE_CURVE_LARGE, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES, TRACK_SLOPE_VERTICAL, TRACK_CURVE_VERTICAL}, + .ExtraTrackPieces = {TRACK_BARREL_ROLL, TRACK_QUARTER_LOOP, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE, TRACK_VERTICAL_LOOP, TRACK_CORKSCREW, TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL | diff --git a/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h b/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h index 3bfd1a91f7..0eb9946b27 100644 --- a/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h +++ b/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor HeartlineTwisterCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_HEARTLINE_ROLL, TRACK_HEARTLINE_TRANSFER}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionHeartlineTwisterRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionHeartlineTwisterRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_HEARTLINE_ROLL, TRACK_HEARTLINE_TRANSFER}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, diff --git a/src/openrct2/ride/coaster/meta/HybridCoaster.h b/src/openrct2/ride/coaster/meta/HybridCoaster.h index 3bdb2755ab..a447dca720 100644 --- a/src/openrct2/ride/coaster/meta/HybridCoaster.h +++ b/src/openrct2/ride/coaster/meta/HybridCoaster.h @@ -15,13 +15,14 @@ // clang-format off constexpr RideTypeDescriptor HybridCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE, TRACK_SLOPE_CURVE_LARGE, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_BOOSTER}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(HybridRC::GetTrackPaintFunction), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = HybridRC::GetTrackPaintFunction, + .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE, TRACK_SLOPE_CURVE_LARGE, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_BOOSTER}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, diff --git a/src/openrct2/ride/coaster/meta/HyperTwister.h b/src/openrct2/ride/coaster/meta/HyperTwister.h index a8e006c2ca..c95241405c 100644 --- a/src/openrct2/ride/coaster/meta/HyperTwister.h +++ b/src/openrct2/ride/coaster/meta/HyperTwister.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor HyperTwisterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_SLOPE_VERTICAL, TRACK_CURVE_VERTICAL, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = { TRACK_LIFT_HILL_STEEP, TRACK_BRAKE_FOR_DROP, TRACK_BOOSTER, TRACK_POWERED_LIFT }, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionBolligerMabillard), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionBolligerMabillard, + .EnabledTrackPieces = { TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_SLOPE_VERTICAL, TRACK_CURVE_VERTICAL, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = { TRACK_LIFT_HILL_STEEP, TRACK_BRAKE_FOR_DROP, TRACK_BOOSTER, TRACK_POWERED_LIFT }, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/Hypercoaster.h b/src/openrct2/ride/coaster/meta/Hypercoaster.h index ee31fe6188..056f8ae89c 100644 --- a/src/openrct2/ride/coaster/meta/Hypercoaster.h +++ b/src/openrct2/ride/coaster/meta/Hypercoaster.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor HypercoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_VERTICAL_LOOP, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BOOSTER}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCorkscrewRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCorkscrewRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_VERTICAL_LOOP, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BOOSTER}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h b/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h index 8c0f1eee1b..ce99f723ce 100644 --- a/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor InvertedHairpinCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionInvertedHairpinRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionInvertedHairpinRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_IS_SUSPENDED, diff --git a/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h b/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h index 84622fd3c4..386f5769c7 100644 --- a/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor InvertedImpulseCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_VERTICAL, TRACK_CURVE_VERTICAL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionInvertedImpulseRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionInvertedImpulseRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_VERTICAL, TRACK_CURVE_VERTICAL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED | diff --git a/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h b/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h index eb9d1c0d0f..9164a8d4ec 100644 --- a/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor InvertedRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_TWIST, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_HALF_LOOP_LARGE, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_BOOSTER}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionInvertedRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionInvertedRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_TWIST, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_HALF_LOOP_LARGE, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_BOOSTER}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED | diff --git a/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h b/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h index 3bb0d0a220..7dd098e0b4 100644 --- a/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor JuniorRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL,TRACK_LIFT_HILL_CURVE, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_BLOCK_BRAKES, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_ON_RIDE_PHOTO}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionJuniorRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionJuniorRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL,TRACK_LIFT_HILL_CURVE, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_BLOCK_BRAKES, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_ON_RIDE_PHOTO}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h b/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h index d3e6ec9c7e..b33782a0b1 100644 --- a/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor LIMLaunchedRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_TWIST, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_BARREL_ROLL, TRACK_SLOPE_CURVE_BANKED, TRACK_SLOPE_STEEP_LONG, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE, TRACK_CORKSCREW_LARGE}, - .ExtraTrackPieces = {TRACK_SLOPE_LONG, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionLimLaunchedRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionLimLaunchedRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_TWIST, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_BARREL_ROLL, TRACK_SLOPE_CURVE_BANKED, TRACK_SLOPE_STEEP_LONG, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE, TRACK_CORKSCREW_LARGE}, + .ExtraTrackPieces = {TRACK_SLOPE_LONG, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h index ba6311b121..342a1d5e68 100644 --- a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h @@ -17,13 +17,22 @@ // clang-format off constexpr RideTypeDescriptor LayDownRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_LAY_DOWN_ROLLER_COASTER_ALT, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_CORKSCREW_UNINVERTED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_BOOSTER}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionLayDownRC), + .TrackPaintFunctions = TrackDrawerDescriptor( + { + .Drawer = GetTrackPaintFunctionLayDownRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_CORKSCREW_UNINVERTED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES }, + .ExtraTrackPieces = { TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_BOOSTER }, + } + ), + .InvertedTrackPaintFunctions = TrackDrawerDescriptor( + { + .Drawer = GetTrackPaintFunctionLayDownRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_INVERTED, TRACK_FLYING_HALF_LOOP_INVERTED_DOWN, TRACK_CORKSCREW_INVERTED }, + .ExtraTrackPieces = { TRACK_FLYING_HALF_LOOP_INVERTED_UP, TRACK_STATION_END, TRACK_LIFT_HILL }, + } + ), .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS, @@ -80,69 +89,4 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = }, }, }; - -constexpr RideTypeDescriptor LayDownRollerCoasterAltRTD = -{ - .AlternateType = RIDE_TYPE_NULL, - .Category = RIDE_CATEGORY_NONE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_INVERTED, TRACK_FLYING_HALF_LOOP_INVERTED_DOWN, TRACK_CORKSCREW_INVERTED}, - .ExtraTrackPieces = {TRACK_FLYING_HALF_LOOP_INVERTED_UP, TRACK_STATION_END, TRACK_LIFT_HILL}, - .CoveredTrackPieces = {}, - .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(nullptr), - .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | - RIDE_TYPE_FLAGS_COMMON_COASTER, - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, - .Naming = { STR_RIDE_NAME_40, STR_RIDE_DESCRIPTION_UNKNOWN }, - .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, - .EnumName = nameof(RIDE_TYPE_LAY_DOWN_ROLLER_COASTER_ALT), - .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), - .Heights = { 26, 24, 8, 11, }, - .MaxMass = 25, - .LiftData = { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }, - .RatingsMultipliers = { 50, 30, 10 }, - .UpkeepCosts = { 49, 20, 90, 11, 3, 15 }, - .BuildCosts = { 53.50_GBP, 2.50_GBP, 50, }, - .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_1, - .PhotoItem = ShopItem::Photo2, - .BonusValue = 100, - .ColourPresets = TRACK_COLOUR_PRESETS( - { COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_YELLOW }, - { COLOUR_DARK_PURPLE, COLOUR_DARK_PURPLE, COLOUR_YELLOW }, - { COLOUR_YELLOW, COLOUR_YELLOW, COLOUR_DARK_GREEN }, - ), - .ColourPreview = { SPR_RIDE_DESIGN_PREVIEW_LAY_DOWN_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_LAY_DOWN_ROLLER_COASTER_SUPPORTS }, - .ColourKey = RideColourKey::Ride, - .Name = "lay_down_rc_alt", - .RatingsData = - { - RatingsCalculationType::Normal, - { RIDE_RATING(3, 85), RIDE_RATING(1, 15), RIDE_RATING(2, 75) }, - 18, - -1, - true, - { - { RatingsModifierType::BonusLength, 6000, 764, 0, 0 }, - { RatingsModifierType::BonusSynchronisation, 0, RIDE_RATING(0, 40), RIDE_RATING(0, 05), 0 }, - { RatingsModifierType::BonusTrainLength, 0, 187245, 0, 0 }, - { RatingsModifierType::BonusMaxSpeed, 0, 44281, 88562, 35424 }, - { RatingsModifierType::BonusAverageSpeed, 0, 291271, 436906, 0 }, - { RatingsModifierType::BonusDuration, 150, 26214, 0, 0 }, - { RatingsModifierType::BonusGForces, 0, 24576, 38130, 49648 }, - { RatingsModifierType::BonusTurns, 0, 26749, 34767, 45749 }, - { RatingsModifierType::BonusDrops, 0, 29127, 46811, 49152 }, - { RatingsModifierType::BonusSheltered, 0, 15420, 32768, 35108 }, - { RatingsModifierType::BonusProximity, 0, 20130, 0, 0 }, - { RatingsModifierType::BonusScenery, 0, 6693, 0, 0 }, - { RatingsModifierType::RequirementInversions, 1, 4, 2, 2 }, - { RatingsModifierType::RequirementMaxSpeed, 0xA0000, 2, 2, 2 }, - { RatingsModifierType::RequirementNegativeGs, FIXED_2DP(0, 40), 2, 2, 2 }, - { RatingsModifierType::RequirementNumDrops, 2, 2, 2, 2 }, - { RatingsModifierType::PenaltyLateralGs, 0, 24576, 38130, 49648 }, - }, - }, -}; // clang-format on diff --git a/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h b/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h index 9c261cba4a..2889c26888 100644 --- a/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor LoopingRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_BOOSTER, TRACK_SLOPE_CURVE_BANKED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_SLOPE_VERTICAL, TRACK_TWIST, TRACK_CORKSCREW, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_SLOPE_LONG, TRACK_BARREL_ROLL, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE,TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionLoopingRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionLoopingRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_BOOSTER, TRACK_SLOPE_CURVE_BANKED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_SLOPE_VERTICAL, TRACK_TWIST, TRACK_CORKSCREW, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_SLOPE_LONG, TRACK_BARREL_ROLL, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE,TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/MineRide.h b/src/openrct2/ride/coaster/meta/MineRide.h index 9366c6e5ab..2f9e930e11 100644 --- a/src/openrct2/ride/coaster/meta/MineRide.h +++ b/src/openrct2/ride/coaster/meta/MineRide.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MineRideRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_ON_RIDE_PHOTO}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMineRide), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMineRide, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_ON_RIDE_PHOTO}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h index 59cb22576e..6d515c7c70 100644 --- a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h +++ b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor MineTrainCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMineTrainRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMineTrainRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h b/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h index dafeec3a03..f69e4774d3 100644 --- a/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MiniRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_LIFT_HILL}, - .ExtraTrackPieces = {TRACK_BOOSTER, TRACK_LIFT_HILL_CURVED}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMiniRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMiniRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_LIFT_HILL}, + .ExtraTrackPieces = {TRACK_BOOSTER, TRACK_LIFT_HILL_CURVED}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h b/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h index e7d9ed6d0c..f5ea7e28c9 100644 --- a/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h +++ b/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MiniSuspendedCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMiniSuspendedRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMiniSuspendedRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | diff --git a/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h b/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h index 762fa54a47..9c6151aec0 100644 --- a/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h @@ -17,13 +17,18 @@ // clang-format off constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER_ALT, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED,TRACK_QUARTER_LOOP_UNINVERTED_UP, TRACK_QUARTER_LOOP_UNINVERTED_DOWN, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMultiDimensionRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMultiDimensionRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED,TRACK_QUARTER_LOOP_UNINVERTED_UP, TRACK_QUARTER_LOOP_UNINVERTED_DOWN, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMultiDimensionRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_INVERTED, TRACK_QUARTER_LOOP_INVERTED_UP, TRACK_QUARTER_LOOP_INVERTED_DOWN}, + .ExtraTrackPieces = {}, + }), .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | @@ -86,68 +91,4 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = }, }; -constexpr RideTypeDescriptor MultiDimensionRollerCoasterAltRTD = -{ - .AlternateType = RIDE_TYPE_NULL, - .Category = RIDE_CATEGORY_NONE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_INVERTED, TRACK_QUARTER_LOOP_INVERTED_UP, TRACK_QUARTER_LOOP_INVERTED_DOWN}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, - .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(nullptr), - .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | - RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAG_HAS_SEAT_ROTATION, - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, - .OperatingSettings = { 10, 27, 30, 25, 25, 0 }, - .Naming = { STR_RIDE_NAME_38, STR_RIDE_DESCRIPTION_UNKNOWN }, - .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, - .EnumName = nameof(RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER_ALT), - .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), - .Heights = { 40, 24, 8, 11, }, - .MaxMass = 78, - .LiftData = { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 6 }, - .RatingsMultipliers = { 50, 30, 10 }, - .UpkeepCosts = { 75, 20, 90, 11, 3, 15 }, - .BuildCosts = { 90.00_GBP, 2.50_GBP, 50, }, - .DefaultPrices = { 20, 20 }, - .DefaultMusic = MUSIC_OBJECT_ROCK_3, - .PhotoItem = ShopItem::Photo2, - .BonusValue = 100, - .ColourPresets = TRACK_COLOUR_PRESETS( - { COLOUR_BRIGHT_PINK, COLOUR_YELLOW, COLOUR_YELLOW }, - { COLOUR_LIGHT_PURPLE, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED }, - { COLOUR_BORDEAUX_RED, COLOUR_WHITE, COLOUR_WHITE }, - ), - .ColourPreview = { SPR_RIDE_DESIGN_PREVIEW_MULTI_DIMENSION_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_MULTI_DIMENSION_ROLLER_COASTER_SUPPORTS }, - .ColourKey = RideColourKey::Ride, - .Name = "multi_dimension_rc_alt", - .RatingsData = - { - RatingsCalculationType::Normal, - { RIDE_RATING(3, 75), RIDE_RATING(1, 95), RIDE_RATING(4, 79) }, - 18, - -1, - true, - { - { RatingsModifierType::BonusLength, 6000, 764, 0, 0 }, - { RatingsModifierType::BonusSynchronisation, 0, RIDE_RATING(0, 40), RIDE_RATING(0, 05), 0 }, - { RatingsModifierType::BonusTrainLength, 0, 187245, 0, 0 }, - { RatingsModifierType::BonusMaxSpeed, 0, 44281, 88562, 35424 }, - { RatingsModifierType::BonusAverageSpeed, 0, 291271, 436906, 0 }, - { RatingsModifierType::BonusDuration, 150, 26214, 0, 0 }, - { RatingsModifierType::BonusGForces, 0, 24576, 38130, 49648 }, - { RatingsModifierType::BonusTurns, 0, 26749, 34767, 45749 }, - { RatingsModifierType::BonusDrops, 0, 29127, 46811, 49152 }, - { RatingsModifierType::BonusSheltered, 0, 15420, 32768, 35108 }, - { RatingsModifierType::BonusProximity, 0, 20130, 0, 0 }, - { RatingsModifierType::BonusScenery, 0, 6693, 0, 0 }, - { RatingsModifierType::RequirementInversions, 1, 4, 1, 1 }, - { RatingsModifierType::RequirementMaxSpeed, 0xA0000, 2, 1, 1 }, - { RatingsModifierType::RequirementNegativeGs, FIXED_2DP(0, 40), 2, 1, 1 }, - { RatingsModifierType::RequirementNumDrops, 2, 2, 1, 1 }, - { RatingsModifierType::PenaltyLateralGs, 0, 24576, 38130, 49648 }, - }, - }, -}; // clang-format on diff --git a/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h b/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h index e1de3681b4..b2ba617e2e 100644 --- a/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h +++ b/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor ReverseFreefallCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL_STEEP, TRACK_REVERSE_FREEFALL, TRACK_ON_RIDE_PHOTO}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionReverseFreefallRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionReverseFreefallRC, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL_STEEP, TRACK_REVERSE_FREEFALL, TRACK_ON_RIDE_PHOTO}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, .RideModes = EnumsToFlags(RideMode::LimPoweredLaunch), .DefaultMode = RideMode::LimPoweredLaunch, diff --git a/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h b/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h index e88b6f8866..4f903e4ca9 100644 --- a/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor ReverserRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_BRAKES, TRACK_REVERSER}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionReverserRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionReverserRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_BRAKES, TRACK_REVERSER}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), diff --git a/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h b/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h index 6b232f2d6e..3b0cb73c38 100644 --- a/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SideFrictionRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSideFrictionRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSideFrictionRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h b/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h index 534649fd20..18bd59feb1 100644 --- a/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h @@ -15,13 +15,14 @@ // clang-format off constexpr RideTypeDescriptor SingleRailRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = { TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_LONG, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BARREL_ROLL, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE, TRACK_SLOPE_CURVE_LARGE, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_SLOPE_STEEP_LONG, TRACK_HALF_LOOP_LARGE}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(SingleRailRC::GetTrackPaintFunction), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = SingleRailRC::GetTrackPaintFunction, + .EnabledTrackPieces = { TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_LONG, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BARREL_ROLL, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE, TRACK_SLOPE_CURVE_LARGE, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_SLOPE_STEEP_LONG, TRACK_HALF_LOOP_LARGE}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/SpinningWildMouse.h b/src/openrct2/ride/coaster/meta/SpinningWildMouse.h index 7bf2d6fc9c..645ea0882b 100644 --- a/src/openrct2/ride/coaster/meta/SpinningWildMouse.h +++ b/src/openrct2/ride/coaster/meta/SpinningWildMouse.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor SpinningWildMouseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT,TRACK_STATION_END,TRACK_LIFT_HILL, TRACK_SLOPE,TRACK_SLOPE_LONG,TRACK_CURVE_VERY_SMALL,TRACK_CURVE_SMALL, TRACK_BRAKES,TRACK_BLOCK_BRAKES,TRACK_ROTATION_CONTROL_TOGGLE}, - .ExtraTrackPieces = {TRACK_LIFT_HILL_STEEP, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionWildMouse), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionWildMouse, + .EnabledTrackPieces = {TRACK_STRAIGHT,TRACK_STATION_END,TRACK_LIFT_HILL, TRACK_SLOPE,TRACK_SLOPE_LONG,TRACK_CURVE_VERY_SMALL,TRACK_CURVE_SMALL, TRACK_BRAKES,TRACK_BLOCK_BRAKES,TRACK_ROTATION_CONTROL_TOGGLE}, + .ExtraTrackPieces = {TRACK_LIFT_HILL_STEEP, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), diff --git a/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h b/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h index 2dd77c306c..d10c6e821d 100644 --- a/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SpiralRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_LIFT_HILL_CURVED}, - .ExtraTrackPieces = {TRACK_BOOSTER, TRACK_LIFT_HILL}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMiniRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMiniRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_LIFT_HILL_CURVED}, + .ExtraTrackPieces = {TRACK_BOOSTER, TRACK_LIFT_HILL}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS, diff --git a/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h b/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h index 31042f6a15..6925a4aac3 100644 --- a/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor StandUpRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionStandUpRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionStandUpRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/SteelWildMouse.h b/src/openrct2/ride/coaster/meta/SteelWildMouse.h index fa6082842b..611fdce5a2 100644 --- a/src/openrct2/ride/coaster/meta/SteelWildMouse.h +++ b/src/openrct2/ride/coaster/meta/SteelWildMouse.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SteelWildMouseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_ROTATION_CONTROL_TOGGLE}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionWildMouse), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionWildMouse, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_ROTATION_CONTROL_TOGGLE}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, diff --git a/src/openrct2/ride/coaster/meta/Steeplechase.h b/src/openrct2/ride/coaster/meta/Steeplechase.h index e2f2fc52c6..b59d4e4710 100644 --- a/src/openrct2/ride/coaster/meta/Steeplechase.h +++ b/src/openrct2/ride/coaster/meta/Steeplechase.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SteeplechaseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSteeplechase), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSteeplechase, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, diff --git a/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h b/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h index 334f540e14..518e0fb6d8 100644 --- a/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h +++ b/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SuspendedSwingingCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_UNBANKED_QUARTER, TRACK_HELIX_UP_UNBANKED_QUARTER, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSuspendedSwingingRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSuspendedSwingingRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_UNBANKED_QUARTER, TRACK_HELIX_UP_UNBANKED_QUARTER, TRACK_BRAKES, TRACK_BLOCK_BRAKES}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_IS_SUSPENDED, diff --git a/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h b/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h index e7f4552c57..5224285673 100644 --- a/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h @@ -19,13 +19,14 @@ // clang-format off constexpr RideTypeDescriptor TwisterRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_HALF_LOOP_LARGE, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_BOOSTER, TRACK_TWIST, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_LIFT_HILL_STEEP, TRACK_BRAKE_FOR_DROP}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionBolligerMabillard), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionBolligerMabillard, + .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_HALF_LOOP_LARGE, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_SLOPE_STEEP_LONG, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_BOOSTER, TRACK_TWIST, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_LIFT_HILL_STEEP, TRACK_BRAKE_FOR_DROP}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h b/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h index 14d69a149f..52270198bc 100644 --- a/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h +++ b/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h @@ -19,13 +19,14 @@ // clang-format off constexpr RideTypeDescriptor VerticalDropCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_CURVE_VERTICAL, TRACK_HALF_LOOP_LARGE, TRACK_BRAKE_FOR_DROP, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_HALF_LOOP_LARGE, TRACK_QUARTER_LOOP, TRACK_BOOSTER, TRACK_TWIST}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionBolligerMabillard), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionBolligerMabillard, + .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_SLOPE_VERTICAL, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_CURVE_VERTICAL, TRACK_HALF_LOOP_LARGE, TRACK_BRAKE_FOR_DROP, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_HALF_LOOP_LARGE, TRACK_QUARTER_LOOP, TRACK_BOOSTER, TRACK_TWIST}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, diff --git a/src/openrct2/ride/coaster/meta/VirginiaReel.h b/src/openrct2/ride/coaster/meta/VirginiaReel.h index 3dbdc8ffa3..28a270c00e 100644 --- a/src/openrct2/ride/coaster/meta/VirginiaReel.h +++ b/src/openrct2/ride/coaster/meta/VirginiaReel.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor VirginiaReelRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionVirginiaReel), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionVirginiaReel, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), diff --git a/src/openrct2/ride/coaster/meta/WaterCoaster.h b/src/openrct2/ride/coaster/meta/WaterCoaster.h index ff0ca82dc4..da9d5e8820 100644 --- a/src/openrct2/ride/coaster/meta/WaterCoaster.h +++ b/src/openrct2/ride/coaster/meta/WaterCoaster.h @@ -18,13 +18,21 @@ // clang-format off constexpr RideTypeDescriptor WaterCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_BLOCK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_SLOPE_LONG}, - .CoveredTrackPieces = {TrackElemType::Flat, TrackElemType::LeftQuarterTurn5Tiles, TrackElemType::RightQuarterTurn5Tiles, TrackElemType::SBendLeft, TrackElemType::SBendRight}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionWaterRC, GetTrackPaintFunctionSplashBoats), + .TrackPaintFunctions = TrackDrawerDescriptor( + { + .Drawer = GetTrackPaintFunctionWaterRC, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_BLOCK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BOOSTER, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_SLOPE_LONG}, + }, + { + .Drawer = GetTrackPaintFunctionSplashBoats, + .EnabledTrackPieces = {TrackElemType::Flat, TrackElemType::LeftQuarterTurn5Tiles, TrackElemType::RightQuarterTurn5Tiles, TrackElemType::SBendLeft, TrackElemType::SBendRight}, + .ExtraTrackPieces = {}, + } + ), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES, diff --git a/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h b/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h index e1dea0b4a3..d739a27665 100644 --- a/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor WoodenRollerCoasterRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_WATER_SPLASH, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, - .ExtraTrackPieces = {TRACK_BOOSTER}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionWoodenRC), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionWoodenRC, + .EnabledTrackPieces = {TRACK_FLAT, TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_WATER_SPLASH, TRACK_SLOPE_CURVE_BANKED, TRACK_BLOCK_BRAKES, TRACK_SLOPE_ROLL_BANKING, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES}, + .ExtraTrackPieces = {TRACK_BOOSTER}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | diff --git a/src/openrct2/ride/coaster/meta/WoodenWildMouse.h b/src/openrct2/ride/coaster/meta/WoodenWildMouse.h index 78b5762e58..53571f5f50 100644 --- a/src/openrct2/ride/coaster/meta/WoodenWildMouse.h +++ b/src/openrct2/ride/coaster/meta/WoodenWildMouse.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor WoodenWildMouseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_ROLLERCOASTER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionWoodenWildMouse), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionWoodenWildMouse, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_LIFT_HILL_STEEP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_LONG, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | diff --git a/src/openrct2/ride/gentle/meta/CarRide.h b/src/openrct2/ride/gentle/meta/CarRide.h index 1111fb1d1a..d0056d8478 100644 --- a/src/openrct2/ride/gentle/meta/CarRide.h +++ b/src/openrct2/ride/gentle/meta/CarRide.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor CarRideRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_SPINNING_TUNNEL}, - .ExtraTrackPieces = {TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_RAPIDS}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCarRide), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCarRide, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_SPINNING_TUNNEL}, + .ExtraTrackPieces = {TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_RAPIDS}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/ride/gentle/meta/Circus.h b/src/openrct2/ride/gentle/meta/Circus.h index 544d8b47cc..0ff77bf175 100644 --- a/src/openrct2/ride/gentle/meta/Circus.h +++ b/src/openrct2/ride/gentle/meta/Circus.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor CircusRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCircus), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCircus, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/gentle/meta/CrookedHouse.h b/src/openrct2/ride/gentle/meta/CrookedHouse.h index e8a4bcbdd4..dbfd6f939e 100644 --- a/src/openrct2/ride/gentle/meta/CrookedHouse.h +++ b/src/openrct2/ride/gentle/meta/CrookedHouse.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor CrookedHouseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCrookedHouse), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCrookedHouse, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_ALLOW_MUSIC | diff --git a/src/openrct2/ride/gentle/meta/Dodgems.h b/src/openrct2/ride/gentle/meta/Dodgems.h index b41b1b5ade..5d3879d39e 100644 --- a/src/openrct2/ride/gentle/meta/Dodgems.h +++ b/src/openrct2/ride/gentle/meta/Dodgems.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor DodgemsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack4x4, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionDodgems), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionDodgems, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_MUSIC_ON_DEFAULT | diff --git a/src/openrct2/ride/gentle/meta/FerrisWheel.h b/src/openrct2/ride/gentle/meta/FerrisWheel.h index 9f11016adf..23de92cd37 100644 --- a/src/openrct2/ride/gentle/meta/FerrisWheel.h +++ b/src/openrct2/ride/gentle/meta/FerrisWheel.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor FerrisWheelRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x4C, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionFerrisWheel), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionFerrisWheel, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | diff --git a/src/openrct2/ride/gentle/meta/FlyingSaucers.h b/src/openrct2/ride/gentle/meta/FlyingSaucers.h index 6429a59217..47e0cc3fce 100644 --- a/src/openrct2/ride/gentle/meta/FlyingSaucers.h +++ b/src/openrct2/ride/gentle/meta/FlyingSaucers.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor FlyingSaucersRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack4x4, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionFlyingSaucers), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionFlyingSaucers, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_ADDITIONAL | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/gentle/meta/GhostTrain.h b/src/openrct2/ride/gentle/meta/GhostTrain.h index 8580afd93c..177b59b5f7 100644 --- a/src/openrct2/ride/gentle/meta/GhostTrain.h +++ b/src/openrct2/ride/gentle/meta/GhostTrain.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor GhostTrainRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_BRAKES, TRACK_SPINNING_TUNNEL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionGhostTrain), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionGhostTrain, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_BRAKES, TRACK_SPINNING_TUNNEL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_G_FORCES | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/gentle/meta/HauntedHouse.h b/src/openrct2/ride/gentle/meta/HauntedHouse.h index 0eb69cc6a9..ec8a20c075 100644 --- a/src/openrct2/ride/gentle/meta/HauntedHouse.h +++ b/src/openrct2/ride/gentle/meta/HauntedHouse.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor HauntedHouseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionHauntedHouse), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionHauntedHouse, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_ALLOW_MUSIC | diff --git a/src/openrct2/ride/gentle/meta/Maze.h b/src/openrct2/ride/gentle/meta/Maze.h index dcda588e15..dea5befb52 100644 --- a/src/openrct2/ride/gentle/meta/Maze.h +++ b/src/openrct2/ride/gentle/meta/Maze.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor MazeRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::Maze, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMaze), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMaze, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA | RIDE_TYPE_FLAG_IS_MAZE, diff --git a/src/openrct2/ride/gentle/meta/MerryGoRound.h b/src/openrct2/ride/gentle/meta/MerryGoRound.h index a478e4552e..d67fc1a0fc 100644 --- a/src/openrct2/ride/gentle/meta/MerryGoRound.h +++ b/src/openrct2/ride/gentle/meta/MerryGoRound.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MerryGoRoundRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMerryGoRound), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMerryGoRound, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_MUSIC_ON_DEFAULT | diff --git a/src/openrct2/ride/gentle/meta/MiniGolf.h b/src/openrct2/ride/gentle/meta/MiniGolf.h index 0f1f29ae7b..f47110aedd 100644 --- a/src/openrct2/ride/gentle/meta/MiniGolf.h +++ b/src/openrct2/ride/gentle/meta/MiniGolf.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MiniGolfRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_MINI_GOLF_HOLE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMiniGolf), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMiniGolf, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_MINI_GOLF_HOLE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_HAS_ONE_STATION | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT, diff --git a/src/openrct2/ride/gentle/meta/MiniHelicopters.h b/src/openrct2/ride/gentle/meta/MiniHelicopters.h index 74d6730e2d..c546fc71f3 100644 --- a/src/openrct2/ride/gentle/meta/MiniHelicopters.h +++ b/src/openrct2/ride/gentle/meta/MiniHelicopters.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor MiniHelicoptersRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, - .ExtraTrackPieces = {TRACK_SPINNING_TUNNEL}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMiniHelicopters), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMiniHelicopters, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, + .ExtraTrackPieces = {TRACK_SPINNING_TUNNEL}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/ride/gentle/meta/MonorailCycles.h b/src/openrct2/ride/gentle/meta/MonorailCycles.h index 1a5321d2af..8ea78654db 100644 --- a/src/openrct2/ride/gentle/meta/MonorailCycles.h +++ b/src/openrct2/ride/gentle/meta/MonorailCycles.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor MonorailCyclesRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMonorailCycles), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMonorailCycles, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | diff --git a/src/openrct2/ride/gentle/meta/MonsterTrucks.h b/src/openrct2/ride/gentle/meta/MonsterTrucks.h index a2ebdee5d6..4a8cdab516 100644 --- a/src/openrct2/ride/gentle/meta/MonsterTrucks.h +++ b/src/openrct2/ride/gentle/meta/MonsterTrucks.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MonsterTrucksRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_RAPIDS}, - .ExtraTrackPieces = {TRACK_SPINNING_TUNNEL}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionCarRide), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionCarRide, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL, TRACK_RAPIDS}, + .ExtraTrackPieces = {TRACK_SPINNING_TUNNEL}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/ride/gentle/meta/ObservationTower.h b/src/openrct2/ride/gentle/meta/ObservationTower.h index e13094fe9f..c35ce95009 100644 --- a/src/openrct2/ride/gentle/meta/ObservationTower.h +++ b/src/openrct2/ride/gentle/meta/ObservationTower.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor ObservationTowerRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {TRACK_TOWER_BASE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::TowerBase, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionObservationTower), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionObservationTower, + .EnabledTrackPieces = {TRACK_TOWER_BASE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | diff --git a/src/openrct2/ride/gentle/meta/SpaceRings.h b/src/openrct2/ride/gentle/meta/SpaceRings.h index 3901013432..c31ff15a6d 100644 --- a/src/openrct2/ride/gentle/meta/SpaceRings.h +++ b/src/openrct2/ride/gentle/meta/SpaceRings.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SpaceRingsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSpaceRings), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSpaceRings, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_SINGLE_SESSION | diff --git a/src/openrct2/ride/gentle/meta/SpiralSlide.h b/src/openrct2/ride/gentle/meta/SpiralSlide.h index ac9be295cd..d21cd83b99 100644 --- a/src/openrct2/ride/gentle/meta/SpiralSlide.h +++ b/src/openrct2/ride/gentle/meta/SpiralSlide.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SpiralSlideRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_GENTLE, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack2x2, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSpiralSlide), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSpiralSlide, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_ALLOW_MUSIC | diff --git a/src/openrct2/ride/shops/meta/CashMachine.h b/src/openrct2/ride/shops/meta/CashMachine.h index f15c9544ea..96f97a884a 100644 --- a/src/openrct2/ride/shops/meta/CashMachine.h +++ b/src/openrct2/ride/shops/meta/CashMachine.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor CashMachineRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionShop), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionShop, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_CASH_MACHINE | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY, diff --git a/src/openrct2/ride/shops/meta/DrinkStall.h b/src/openrct2/ride/shops/meta/DrinkStall.h index e191b42572..6f54445ced 100644 --- a/src/openrct2/ride/shops/meta/DrinkStall.h +++ b/src/openrct2/ride/shops/meta/DrinkStall.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor DrinkStallRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionShop), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionShop, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_SELLS_DRINKS | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | diff --git a/src/openrct2/ride/shops/meta/FirstAid.h b/src/openrct2/ride/shops/meta/FirstAid.h index 82486bb851..d58f72f1b8 100644 --- a/src/openrct2/ride/shops/meta/FirstAid.h +++ b/src/openrct2/ride/shops/meta/FirstAid.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor FirstAidRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionFacility), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionFacility, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IS_FIRST_AID | RIDE_TYPE_FLAG_PEEP_SHOULD_GO_INSIDE_FACILITY | diff --git a/src/openrct2/ride/shops/meta/FoodStall.h b/src/openrct2/ride/shops/meta/FoodStall.h index 1efc4008ea..0433b45806 100644 --- a/src/openrct2/ride/shops/meta/FoodStall.h +++ b/src/openrct2/ride/shops/meta/FoodStall.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor FoodStallRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionShop), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionShop, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_SELLS_FOOD | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | diff --git a/src/openrct2/ride/shops/meta/InformationKiosk.h b/src/openrct2/ride/shops/meta/InformationKiosk.h index d9f39543eb..487d0f9b62 100644 --- a/src/openrct2/ride/shops/meta/InformationKiosk.h +++ b/src/openrct2/ride/shops/meta/InformationKiosk.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor InformationKioskRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1B, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionShop), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionShop, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | diff --git a/src/openrct2/ride/shops/meta/Shop.h b/src/openrct2/ride/shops/meta/Shop.h index be0a2b8dbe..59d1edab31 100644 --- a/src/openrct2/ride/shops/meta/Shop.h +++ b/src/openrct2/ride/shops/meta/Shop.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor ShopRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionShop), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionShop, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | diff --git a/src/openrct2/ride/shops/meta/Toilets.h b/src/openrct2/ride/shops/meta/Toilets.h index 5633a07935..8514e061a7 100644 --- a/src/openrct2/ride/shops/meta/Toilets.h +++ b/src/openrct2/ride/shops/meta/Toilets.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor ToiletsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_SHOP, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x1A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionFacility), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionFacility, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_PEEP_SHOULD_GO_INSIDE_FACILITY | RIDE_TYPE_FLAG_IN_RIDE | diff --git a/src/openrct2/ride/thrill/meta/3DCinema.h b/src/openrct2/ride/thrill/meta/3DCinema.h index 3a8ae668f1..3f702f2e77 100644 --- a/src/openrct2/ride/thrill/meta/3DCinema.h +++ b/src/openrct2/ride/thrill/meta/3DCinema.h @@ -17,13 +17,14 @@ // C++ does not allow names to start with a number, hence the absence of the '3D' prefix. constexpr RideTypeDescriptor CinemaRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunction3dCinema), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunction3dCinema, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/thrill/meta/Enterprise.h b/src/openrct2/ride/thrill/meta/Enterprise.h index 461a1d1952..0938e9e502 100644 --- a/src/openrct2/ride/thrill/meta/Enterprise.h +++ b/src/openrct2/ride/thrill/meta/Enterprise.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor EnterpriseRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack4x4, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionEnterprise), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionEnterprise, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/thrill/meta/GoKarts.h b/src/openrct2/ride/thrill/meta/GoKarts.h index 735975d20c..e60ed3a9aa 100644 --- a/src/openrct2/ride/thrill/meta/GoKarts.h +++ b/src/openrct2/ride/thrill/meta/GoKarts.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor GoKartsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionGoKarts), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionGoKarts, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_HAS_ONE_STATION | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT, diff --git a/src/openrct2/ride/thrill/meta/LaunchedFreefall.h b/src/openrct2/ride/thrill/meta/LaunchedFreefall.h index 15c325fd82..2a94f42dac 100644 --- a/src/openrct2/ride/thrill/meta/LaunchedFreefall.h +++ b/src/openrct2/ride/thrill/meta/LaunchedFreefall.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor LaunchedFreefallRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {TRACK_TOWER_BASE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::TowerBase, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionLaunchedFreefall), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionLaunchedFreefall, + .EnabledTrackPieces = {TRACK_TOWER_BASE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/ride/thrill/meta/MagicCarpet.h b/src/openrct2/ride/thrill/meta/MagicCarpet.h index 3070519b89..75632aa03f 100644 --- a/src/openrct2/ride/thrill/meta/MagicCarpet.h +++ b/src/openrct2/ride/thrill/meta/MagicCarpet.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor MagicCarpetRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x4A, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMagicCarpet), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMagicCarpet, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/thrill/meta/MotionSimulator.h b/src/openrct2/ride/thrill/meta/MotionSimulator.h index c33602634c..ce95c26e34 100644 --- a/src/openrct2/ride/thrill/meta/MotionSimulator.h +++ b/src/openrct2/ride/thrill/meta/MotionSimulator.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor MotionSimulatorRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack2x2, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMotionsimulator), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMotionsimulator, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | diff --git a/src/openrct2/ride/thrill/meta/RotoDrop.h b/src/openrct2/ride/thrill/meta/RotoDrop.h index 94e02fa8af..6a8dbbd8c8 100644 --- a/src/openrct2/ride/thrill/meta/RotoDrop.h +++ b/src/openrct2/ride/thrill/meta/RotoDrop.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor RotoDropRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {TRACK_TOWER_BASE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::TowerBase, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionRotoDrop), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionRotoDrop, + .EnabledTrackPieces = {TRACK_TOWER_BASE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | diff --git a/src/openrct2/ride/thrill/meta/SwingingInverterShip.h b/src/openrct2/ride/thrill/meta/SwingingInverterShip.h index 6df8eb6d0a..6717feefb1 100644 --- a/src/openrct2/ride/thrill/meta/SwingingInverterShip.h +++ b/src/openrct2/ride/thrill/meta/SwingingInverterShip.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SwingingInverterShipRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x4B, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSwingingInverterShip), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSwingingInverterShip, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/thrill/meta/SwingingShip.h b/src/openrct2/ride/thrill/meta/SwingingShip.h index 55e861a334..eda2505d40 100644 --- a/src/openrct2/ride/thrill/meta/SwingingShip.h +++ b/src/openrct2/ride/thrill/meta/SwingingShip.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SwingingShipRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack1x5, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSwingingShip), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSwingingShip, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | diff --git a/src/openrct2/ride/thrill/meta/TopSpin.h b/src/openrct2/ride/thrill/meta/TopSpin.h index df9aca85d6..0bd85bc5fb 100644 --- a/src/openrct2/ride/thrill/meta/TopSpin.h +++ b/src/openrct2/ride/thrill/meta/TopSpin.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor TopSpinRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionTopspin), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionTopspin, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/thrill/meta/Twist.h b/src/openrct2/ride/thrill/meta/Twist.h index 27b2ac67d6..a9e8462fd6 100644 --- a/src/openrct2/ride/thrill/meta/Twist.h +++ b/src/openrct2/ride/thrill/meta/Twist.h @@ -16,13 +16,14 @@ // clang-format off constexpr RideTypeDescriptor TwistRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_THRILL, - .EnabledTrackPieces = {}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::FlatTrack3x3, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionTwist), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionTwist, + .EnabledTrackPieces = {}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | diff --git a/src/openrct2/ride/transport/meta/Chairlift.h b/src/openrct2/ride/transport/meta/Chairlift.h index 753a526240..c07deef1a7 100644 --- a/src/openrct2/ride/transport/meta/Chairlift.h +++ b/src/openrct2/ride/transport/meta/Chairlift.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor ChairliftRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_TRANSPORT, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionChairlift), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionChairlift, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | diff --git a/src/openrct2/ride/transport/meta/Lift.h b/src/openrct2/ride/transport/meta/Lift.h index 11f2fd241f..aeb651bb8e 100644 --- a/src/openrct2/ride/transport/meta/Lift.h +++ b/src/openrct2/ride/transport/meta/Lift.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor LiftRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_TRANSPORT, - .EnabledTrackPieces = {TRACK_TOWER_BASE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::TowerBase, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionLift), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionLift, + .EnabledTrackPieces = {TRACK_TOWER_BASE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_ALLOW_EXTRA_TOWER_BASES | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/ride/transport/meta/MiniatureRailway.h b/src/openrct2/ride/transport/meta/MiniatureRailway.h index dc8c613c25..0d85ecae90 100644 --- a/src/openrct2/ride/transport/meta/MiniatureRailway.h +++ b/src/openrct2/ride/transport/meta/MiniatureRailway.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor MiniatureRailwayRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_TRANSPORT, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMiniatureRailway), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMiniatureRailway, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/ride/transport/meta/Monorail.h b/src/openrct2/ride/transport/meta/Monorail.h index 068c25dddb..bf00e87d78 100644 --- a/src/openrct2/ride/transport/meta/Monorail.h +++ b/src/openrct2/ride/transport/meta/Monorail.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor MonorailRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_TRANSPORT, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionMonorail), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionMonorail, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_ADDITIONAL | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/transport/meta/SuspendedMonorail.h b/src/openrct2/ride/transport/meta/SuspendedMonorail.h index 2ff5b639cb..572dc296ba 100644 --- a/src/openrct2/ride/transport/meta/SuspendedMonorail.h +++ b/src/openrct2/ride/transport/meta/SuspendedMonorail.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor SuspendedMonorailRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_TRANSPORT, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSuspendedMonorail), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSuspendedMonorail, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/water/meta/BoatHire.h b/src/openrct2/ride/water/meta/BoatHire.h index cc3b72021e..6da96f60eb 100644 --- a/src/openrct2/ride/water/meta/BoatHire.h +++ b/src/openrct2/ride/water/meta/BoatHire.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor BoatHireRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_CURVE_VERY_SMALL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionBoatHire), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionBoatHire, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_CURVE_VERY_SMALL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_CHECK_FOR_STALLING | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT, diff --git a/src/openrct2/ride/water/meta/DinghySlide.h b/src/openrct2/ride/water/meta/DinghySlide.h index 46a9b6f0a5..bad3c78765 100644 --- a/src/openrct2/ride/water/meta/DinghySlide.h +++ b/src/openrct2/ride/water/meta/DinghySlide.h @@ -17,13 +17,21 @@ // clang-format off constexpr RideTypeDescriptor DinghySlideRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {TrackElemType::Flat, TrackElemType::Up25, TrackElemType::Up60, TrackElemType::FlatToUp25, TrackElemType::Up25ToUp60, TrackElemType::Up60ToUp25, TrackElemType::Up25ToFlat, TrackElemType::Down25, TrackElemType::Down60, TrackElemType::FlatToDown25, TrackElemType::Down25ToDown60, TrackElemType::Down60ToDown25, TrackElemType::Down25ToFlat, TrackElemType::LeftQuarterTurn5Tiles, TrackElemType::RightQuarterTurn5Tiles, TrackElemType::SBendLeft, TrackElemType::SBendRight, TrackElemType::LeftQuarterTurn3Tiles,TrackElemType::RightQuarterTurn3Tiles}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionDinghySlide, GetTrackPaintFunctionDinghySlideCovered), + .TrackPaintFunctions = TrackDrawerDescriptor( + { + .Drawer = GetTrackPaintFunctionDinghySlide, + .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE }, + .ExtraTrackPieces = {}, + }, + { + .Drawer = GetTrackPaintFunctionDinghySlideCovered, + .EnabledTrackPieces = {TrackElemType::Flat, TrackElemType::Up25, TrackElemType::Up60, TrackElemType::FlatToUp25, TrackElemType::Up25ToUp60, TrackElemType::Up60ToUp25, TrackElemType::Up25ToFlat, TrackElemType::Down25, TrackElemType::Down60, TrackElemType::FlatToDown25, TrackElemType::Down25ToDown60, TrackElemType::Down60ToDown25, TrackElemType::Down25ToFlat, TrackElemType::LeftQuarterTurn5Tiles, TrackElemType::RightQuarterTurn5Tiles, TrackElemType::SBendLeft, TrackElemType::SBendRight, TrackElemType::LeftQuarterTurn3Tiles,TrackElemType::RightQuarterTurn3Tiles}, + .ExtraTrackPieces = {}, + } + ), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_G_FORCES | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES | diff --git a/src/openrct2/ride/water/meta/LogFlume.h b/src/openrct2/ride/water/meta/LogFlume.h index 70598a0c9c..3791042a82 100644 --- a/src/openrct2/ride/water/meta/LogFlume.h +++ b/src/openrct2/ride/water/meta/LogFlume.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor LogFlumeRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_ON_RIDE_PHOTO, TRACK_LOG_FLUME_REVERSER, TRACK_SLOPE_STEEP_DOWN}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionLogFlume), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionLogFlume, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_ON_RIDE_PHOTO, TRACK_LOG_FLUME_REVERSER, TRACK_SLOPE_STEEP_DOWN}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | diff --git a/src/openrct2/ride/water/meta/RiverRafts.h b/src/openrct2/ride/water/meta/RiverRafts.h index 03a0adb17c..411e8b374d 100644 --- a/src/openrct2/ride/water/meta/RiverRafts.h +++ b/src/openrct2/ride/water/meta/RiverRafts.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor RiverRaftsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_S_BEND, TRACK_CURVE}, - .ExtraTrackPieces = {TRACK_SLOPE, TRACK_SLOPE_STEEP_DOWN, TRACK_ON_RIDE_PHOTO}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSplashBoats), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSplashBoats, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_S_BEND, TRACK_CURVE}, + .ExtraTrackPieces = {TRACK_SLOPE, TRACK_SLOPE_STEEP_DOWN, TRACK_ON_RIDE_PHOTO}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/water/meta/RiverRapids.h b/src/openrct2/ride/water/meta/RiverRapids.h index b188f18d45..75798341e1 100644 --- a/src/openrct2/ride/water/meta/RiverRapids.h +++ b/src/openrct2/ride/water/meta/RiverRapids.h @@ -17,13 +17,14 @@ // clang-format off constexpr RideTypeDescriptor RiverRapidsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_ON_RIDE_PHOTO, TRACK_RAPIDS, TRACK_WATERFALL, TRACK_WHIRLPOOL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionRiverRapids), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionRiverRapids, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_CURVE_VERY_SMALL, TRACK_ON_RIDE_PHOTO, TRACK_RAPIDS, TRACK_WATERFALL, TRACK_WHIRLPOOL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | diff --git a/src/openrct2/ride/water/meta/SplashBoats.h b/src/openrct2/ride/water/meta/SplashBoats.h index 3c403329f7..8b09a53eab 100644 --- a/src/openrct2/ride/water/meta/SplashBoats.h +++ b/src/openrct2/ride/water/meta/SplashBoats.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor SplashBoatsRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE, TRACK_ON_RIDE_PHOTO}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSplashBoats), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSplashBoats, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_SLOPE, TRACK_SLOPE_STEEP_DOWN, TRACK_S_BEND, TRACK_CURVE, TRACK_ON_RIDE_PHOTO}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | diff --git a/src/openrct2/ride/water/meta/SubmarineRide.h b/src/openrct2/ride/water/meta/SubmarineRide.h index 51e83dac77..285fdcc33d 100644 --- a/src/openrct2/ride/water/meta/SubmarineRide.h +++ b/src/openrct2/ride/water/meta/SubmarineRide.h @@ -18,13 +18,14 @@ // clang-format off constexpr RideTypeDescriptor SubmarineRideRTD = { - .AlternateType = RIDE_TYPE_NULL, .Category = RIDE_CATEGORY_WATER, - .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, - .ExtraTrackPieces = {}, - .CoveredTrackPieces = {}, .StartTrackPiece = TrackElemType::EndStation, - .TrackPaintFunctions = TrackDrawerDescriptor(GetTrackPaintFunctionSubmarineRide), + .TrackPaintFunctions = TrackDrawerDescriptor({ + .Drawer = GetTrackPaintFunctionSubmarineRide, + .EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_CURVE_VERY_SMALL, TRACK_CURVE_SMALL}, + .ExtraTrackPieces = {}, + }), + .InvertedTrackPaintFunctions = {}, .Flags = RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | diff --git a/src/openrct2/windows/_legacy.cpp b/src/openrct2/windows/_legacy.cpp index f2d78f4cea..c749fb40e0 100644 --- a/src/openrct2/windows/_legacy.cpp +++ b/src/openrct2/windows/_legacy.cpp @@ -299,10 +299,10 @@ bool WindowRideConstructionUpdateState( } const auto& rtd = ride->GetRideTypeDescriptor(); - if (rtd.HasFlag(RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES) - && _currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_PIECES) + const auto trackDrawerDecriptor = getCurrentTrackDrawerDescriptor(rtd); + if (trackDrawerDecriptor.HasCoveredPieces() && _currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_PIECES) { - auto availablePieces = rtd.CoveredTrackPieces; + auto availablePieces = trackDrawerDecriptor.Covered.EnabledTrackPieces; const auto& ted = GetTrackElementDescriptor(trackType); auto alternativeType = ted.AlternativeType; // this method limits the track element types that can be used From e1127cde8aab924f4fae547df85d2377fd449d2e Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 20 Mar 2024 17:58:13 +0100 Subject: [PATCH 2/2] Split Lay-down RC track drawer --- src/openrct2/libopenrct2.vcxproj | 2 +- src/openrct2/ride/TrackPaint.h | 2 +- .../ride/coaster/CorkscrewRollerCoaster.cpp | 2 +- .../ride/coaster/LayDownRollerCoaster.cpp | 9995 ----------------- .../coaster/LayDownRollerCoasterInverted.cpp | 8884 +++++++++++++++ .../ride/coaster/meta/LayDownRollerCoaster.h | 4 +- 6 files changed, 8889 insertions(+), 10000 deletions(-) delete mode 100644 src/openrct2/ride/coaster/LayDownRollerCoaster.cpp create mode 100644 src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 5bf4284f55..3dda36af25 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -914,7 +914,7 @@ - + diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 3f47862be2..d1f4299c26 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -462,7 +462,7 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingRC(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionVirginiaReel(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionSplashBoats(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniHelicopters(int32_t trackType); -TRACK_PAINT_FUNCTION GetTrackPaintFunctionLayDownRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLayDownRCInverted(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionSuspendedMonorail(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionReverserRC(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionHeartlineTwisterRC(int32_t trackType); diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index a99e9d3649..ae141b643e 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -11384,7 +11384,7 @@ static void LayDownRCTrackHalfLoopUninvertedDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - auto function = GetTrackPaintFunctionLayDownRC(TrackElemType::FlyerHalfLoopInvertedUp); + auto function = GetTrackPaintFunctionLayDownRCInverted(TrackElemType::FlyerHalfLoopInvertedUp); function(session, ride, 3 - trackSequence, direction, height, trackElement); return; } diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp deleted file mode 100644 index 47793932fe..0000000000 --- a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp +++ /dev/null @@ -1,9995 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014-2024 OpenRCT2 developers - * - * For a complete list of all authors, please refer to contributors.md - * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is licensed under the GNU General Public License version 3. - *****************************************************************************/ - -#include "../../drawing/Drawing.h" -#include "../../interface/Viewport.h" -#include "../../paint/Paint.h" -#include "../../paint/support/MetalSupports.h" -#include "../../paint/tile_element/Paint.TileElement.h" -#include "../../sprites.h" -#include "../../world/Map.h" -#include "../RideData.h" -#include "../TrackData.h" -#include "../TrackPaint.h" -static constexpr const uint32_t LaydownDiagBrakeImages[2][NumOrthogonalDirections] = { - { - SPR_G2_CORKSCREW_DIAG_BRAKES, - SPR_G2_CORKSCREW_DIAG_BRAKES + 1, - SPR_G2_CORKSCREW_DIAG_BRAKES, - SPR_G2_CORKSCREW_DIAG_BRAKES + 1, - }, - { - SPR_G2_SLC_DIAG_BRAKES, - SPR_G2_SLC_DIAG_BRAKES + 2, - SPR_G2_SLC_DIAG_BRAKES, - SPR_G2_SLC_DIAG_BRAKES + 2, - }, -}; - -static constexpr const uint32_t LaydownDiagBlockBrakeImages[2][2][NumOrthogonalDirections] = { - { - { - SPR_G2_CORKSCREW_DIAG_BRAKES + 3, - SPR_G2_CORKSCREW_DIAG_BRAKES + 5, - SPR_G2_CORKSCREW_DIAG_BRAKES + 3, - SPR_G2_CORKSCREW_DIAG_BRAKES + 5, - }, - { - SPR_G2_CORKSCREW_DIAG_BRAKES + 2, - SPR_G2_CORKSCREW_DIAG_BRAKES + 4, - SPR_G2_CORKSCREW_DIAG_BRAKES + 2, - SPR_G2_CORKSCREW_DIAG_BRAKES + 4, - }, - }, - { - { - SPR_G2_SLC_DIAG_BRAKES, - SPR_G2_SLC_DIAG_BRAKES + 2, - SPR_G2_SLC_DIAG_BRAKES, - SPR_G2_SLC_DIAG_BRAKES + 2, - }, - { - SPR_G2_SLC_DIAG_BRAKES, - SPR_G2_SLC_DIAG_BRAKES + 1, - SPR_G2_SLC_DIAG_BRAKES, - SPR_G2_SLC_DIAG_BRAKES + 1, - }, - }, -}; - -/** rct2: 0x0082491C */ -static void LayDownRCTrackFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Flat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26557), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 1 } }); - break; - case 1: - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26558), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 1 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26555), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 1 } }); - break; - case 1: - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26556), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 1 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824B8C, 0x00824B9C, 0x00824BAC */ -static void LayDownRCTrackStation( - PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (trackElement.IsInverted()) - { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, - }; - - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), - { 0, 0, height }, { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 1 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::TubesInverted); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } - else - { - auto function = GetTrackPaintFunctionCorkscrewRC(trackElement.GetTrackType()); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } -} - -/** rct2: 0x0082492C */ -static void LayDownRCTrack25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26621), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26622), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26623), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26624), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26569), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26570), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26571), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26572), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 51, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 51, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 51, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 51, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); - } - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - } -} - -/** rct2: 0x0082493C */ -static void LayDownRCTrack60DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26585), { 0, 0, height + 24 }, - { { 0, 6, height + 88 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26586), { 0, 0, height + 24 }, - { { 0, 4, height + 6 }, { 32, 2, 81 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26587), { 0, 0, height + 24 }, - { { 0, 4, height + 6 }, { 32, 2, 81 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26588), { 0, 0, height + 24 }, - { { 0, 6, height + 88 }, { 32, 20, 3 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - } -} - -/** rct2: 0x0082494C */ -static void LayDownRCTrackFlatTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::FlatToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26613), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26614), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26615), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26616), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26561), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26562), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26563), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26564), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 43, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 43, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 43, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 43, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - } -} - -/** rct2: 0x0082495C */ -static void LayDownRCTrack25DegUpTo60DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up25ToUp60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26573), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26577), { 0, 0, height + 24 }, - { { 0, 10, height + 6 }, { 32, 10, 49 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26574), { 0, 0, height + 24 }, - { { 0, 4, height + 6 }, { 32, 2, 49 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26578), { 0, 0, height + 24 }, - { { 0, 10, height + 6 }, { 32, 10, 49 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26575), { 0, 0, height + 24 }, - { { 0, 4, height + 6 }, { 32, 2, 49 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26576), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - } -} - -/** rct2: 0x0082496C */ -static void LayDownRCTrack60DegUpTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up60ToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26579), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26583), { 0, 0, height + 24 }, - { { 0, 10, height + 6 }, { 32, 10, 49 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26580), { 0, 0, height + 24 }, - { { 0, 4, height + 6 }, { 32, 2, 49 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26584), { 0, 0, height + 24 }, - { { 0, 10, height + 6 }, { 32, 10, 49 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26581), { 0, 0, height + 24 }, - { { 0, 4, height + 6 }, { 32, 2, 49 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26582), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 65, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 65, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 65, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 65, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - } -} - -/** rct2: 0x0082497C */ -static void LayDownRCTrack25DegUpToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up25ToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26617), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26618), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26619), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26620), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26565), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26566), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26567), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26568), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); - } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - } -} - -/** rct2: 0x0082498C */ -static void LayDownRCTrack25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x0082499C */ -static void LayDownRCTrack60DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x008249AC */ -static void LayDownRCTrackFlatTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x008249BC */ -static void LayDownRCTrack25DegDownTo60DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x008249CC */ -static void LayDownRCTrack60DegDownTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x008249DC */ -static void LayDownRCTrack25DegDownToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x008249EC */ -static void LayDownRCTrackLeftQuarterTurn5( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftQuarterTurn5Tiles); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26694), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26699), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26704), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26689), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26693), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26698), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26703), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26688), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26692), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26697), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26702), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26687), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26691), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26696), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26701), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26686), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26690), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26695), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26700), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26685), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x008249FC */ -static void LayDownRCTrackRightQuarterTurn5( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - LayDownRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824A0C */ -static void LayDownRCTrackFlatToLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::FlatToLeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26657), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26658), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26659), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26660), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824A1C */ -static void LayDownRCTrackFlatToRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::FlatToRightBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26661), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26662), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26663), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26664), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824A2C */ -static void LayDownRCTrackLeftBankToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftBankToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26663), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26664), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26661), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26662), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824A3C */ -static void LayDownRCTrackRightBankToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::RightBankToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26659), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26660), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26657), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26658), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824A4C */ -static void LayDownRCTrackBankedLeftQuarterTurn5( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::BankedLeftQuarterTurn5Tiles); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26738), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26743), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26748), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26733), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26737), { 0, 0, height + 24 }, { 32, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26742), { 0, 0, height + 24 }, { 32, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26747), { 0, 0, height + 24 }, - { { 0, 16, height + 24 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26732), { 0, 0, height + 24 }, - { { 0, 16, height + 24 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26736), { 0, 0, height + 24 }, - { { 0, 16, height + 24 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26741), { 0, 0, height + 24 }, - { { 16, 16, height + 24 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26746), { 0, 0, height + 24 }, - { { 16, 0, height + 24 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26731), { 0, 0, height + 24 }, { 16, 16, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26735), { 0, 0, height + 24 }, - { { 16, 0, height + 24 }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26740), { 0, 0, height + 24 }, { 16, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26745), { 0, 0, height + 24 }, { 16, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26730), { 0, 0, height + 24 }, - { { 16, 0, height + 24 }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26734), { 0, 0, height + 24 }, - { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26739), { 0, 0, height + 24 }, - { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26744), { 0, 0, height + 24 }, - { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26729), { 0, 0, height + 24 }, - { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824A5C */ -static void LayDownRCTrackBankedRightQuarterTurn5( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - LayDownRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824A6C */ -static void LayDownRCTrackLeftBankTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftBankToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26665), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26666), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26667), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26668), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - } -} - -/** rct2: 0x00824A7C */ -static void LayDownRCTrackRightBankTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::RightBankToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26669), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26670), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26671), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26672), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - } -} - -/** rct2: 0x00824A8C */ -static void LayDownRCTrack25DegUpToLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up25ToLeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26673), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26674), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26675), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26676), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); - } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - } -} - -/** rct2: 0x00824A9C */ -static void LayDownRCTrack25DegUpToRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Up25ToRightBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26677), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26678), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26679), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26680), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, - session.SupportColours); - break; - } - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); - } - else - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); - } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - } -} - -/** rct2: 0x00824AAC */ -static void LayDownRCTrackLeftBankTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824ABC */ -static void LayDownRCTrackRightBankTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824ACC */ -static void LayDownRCTrack25DegDownToLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824ADC */ -static void LayDownRCTrack25DegDownToRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824AEC */ -static void LayDownRCTrackLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26681), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26682), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26683), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26684), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824AFC */ -static void LayDownRCTrackRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824B0C */ -static void LayDownRCTrackLeftQuarterTurn525DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftQuarterTurn5TilesUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26949), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26954), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26959), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26964), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26950), { 0, 0, height + 24 }, { 32, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26955), { 0, 0, height + 24 }, { 32, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26960), { 0, 16, height + 24 }, { 32, 16, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26965), { 0, 16, height + 24 }, { 32, 16, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26951), { 0, 16, height + 24 }, { 16, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26956), { 16, 16, height + 24 }, { 16, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26961), { 16, 0, height + 24 }, { 16, 16, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26966), { 0, 0, height + 24 }, { 16, 16, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26952), { 16, 0, height + 24 }, { 16, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26957), { 0, 0, height + 24 }, { 16, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26962), { 0, 0, height + 24 }, { 16, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26967), { 16, 0, height + 24 }, { 16, 32, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26953), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26958), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26963), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26968), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, - session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); - break; - case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824B1C */ -static void LayDownRCTrackRightQuarterTurn525DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::RightQuarterTurn5TilesUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26929), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26934), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26939), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26944), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26930), { 0, 16, height + 24 }, { 32, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26935), { 0, 16, height + 24 }, { 32, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26940), { 0, 0, height + 24 }, { 32, 16, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26945), { 0, 0, height + 24 }, { 32, 16, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26931), { 0, 0, height + 24 }, { 16, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26936), { 16, 0, height + 24 }, { 16, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26941), { 16, 16, height + 24 }, { 16, 16, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26946), { 0, 16, height + 24 }, { 16, 16, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26932), { 16, 0, height + 24 }, { 16, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26937), { 0, 0, height + 24 }, { 16, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26942), { 0, 0, height + 24 }, { 16, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26947), { 16, 0, height + 24 }, { 16, 32, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26933), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26938), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26943), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26948), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, - session.SupportColours); - - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); - break; - case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824B2C */ -static void LayDownRCTrackLeftQuarterTurn525DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - LayDownRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); -} - -/** rct2: 0x00824B3C */ -static void LayDownRCTrackRightQuarterTurn525DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - LayDownRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824B4C */ -static void LayDownRCTrackSBendLeft( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::SBendLeft); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26641), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26645), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26644), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26648), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26642), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26646), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26643), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26647), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26643), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26647), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26642), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26646), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26644), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26648), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26641), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26645), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824B5C */ -static void LayDownRCTrackSBendRight( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::SBendRight); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26649), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26653), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26652), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26656), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26650), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26654), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26651), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26655), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26651), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26655), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 26, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26650), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26654), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 26, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26652), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26656), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26649), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26653), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824BBC */ -static void LayDownRCTrackLeftQuarterTurn3( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16381), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16384), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16387), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16378), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16380), { 0, 0, height }, - { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16383), { 0, 0, height }, - { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16386), { 0, 0, height }, - { { 0, 16, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16377), { 0, 0, height }, - { { 16, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16379), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16382), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16385), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16376), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26710), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26713), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26716), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26707), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26709), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26712), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26715), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26706), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26708), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26711), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26714), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26705), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824BCC */ -static void LayDownRCTrackRightQuarterTurn3( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - LayDownRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824BDC */ -static void LayDownRCTrackLeftQuarterTurn3Bank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16393), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16400), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16396), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16399), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16390), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16392), { 0, 0, height }, - { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16395), { 0, 0, height }, - { { 0, 0, height + 27 }, { 16, 16, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16398), { 0, 0, height }, - { { 0, 16, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16389), { 0, 0, height }, - { { 16, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16391), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16394), { 0, 0, height }, - { { 27, 0, height }, { 1, 32, 26 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16397), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16401), { 0, 0, height }, - { { 27, 0, height }, { 1, 32, 26 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16388), { 0, 0, height }, - { { 6, 0, height }, { 20, 32, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26722), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26725), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26728), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26719), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26721), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26724), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26727), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26718), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26720), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26723), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26726), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26717), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824BEC */ -static void LayDownRCTrackRightQuarterTurn3Bank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - LayDownRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824BFC */ -static void LayDownRCTrackLeftQuarterTurn325DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16541), { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16543), { 0, 6, height }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16545), { 0, 6, height }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16539), { 0, 6, height }, { 32, 20, 3 }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16540), { 6, 0, height }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16542), { 6, 0, height }, { 20, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16544), { 6, 0, height }, { 20, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16538), { 6, 0, height }, { 20, 32, 3 }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); - break; - case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26924), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26926), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26928), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26922), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26923), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26925), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26927), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26921), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, - session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); - break; - case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824C0C */ -static void LayDownRCTrackRightQuarterTurn325DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16530), { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16532), { 0, 6, height }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16534), { 0, 6, height }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16536), { 0, 6, height }, { 32, 20, 3 }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16531), { 6, 0, height }, { 20, 32, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16533), { 6, 0, height }, { 20, 32, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16535), { 6, 0, height }, { 20, 32, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 10, height, - session.SupportColours); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16537), { 6, 0, height }, { 20, 32, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, - session.SupportColours); - break; - } - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); - break; - case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26913), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26915), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26917), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26919), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26914), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26916), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26918), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26920), { 6, 0, height + 24 }, { 20, 32, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, - session.SupportColours); - - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); - break; - case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824C1C */ -static void LayDownRCTrackLeftQuarterTurn325DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - LayDownRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); -} - -/** rct2: 0x00824C2C */ -static void LayDownRCTrackRightQuarterTurn325DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - LayDownRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824D3C */ -static void LayDownRCTrackLeftQuarterTurn160DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftQuarterTurn1TileUp60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26910), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26906), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26911), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26907), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26912), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26908), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26909), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26905), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - } - - TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - } -} - -/** rct2: 0x00824D1C */ -static void LayDownRCTrackRightQuarterTurn160DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::RightQuarterTurn1TileUp60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26901), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26897), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26902), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26898), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26903), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26899), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26904), { 0, 0, height }, - { { 2, 2, height }, { 28, 28, 3 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26900), { 0, 0, height }, - { { 2, 2, height + 99 }, { 28, 28, 1 } }); - break; - } - } - - TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); -} - -/** rct2: 0x00824D2C */ -static void LayDownRCTrackLeftQuarterTurn160DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); -} - -/** rct2: 0x00824D4C */ -static void LayDownRCTrackRightQuarterTurn160DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - LayDownRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); -} - -/** rct2: 0x00824D5C */ -static void LayDownRCTrackBrakes( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::Brakes); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26559), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 1: - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26560), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824D6C */ -static void LayDownRCTrackOnRidePhoto( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::OnRidePhoto); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); - - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26555), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26556), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26555), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26556), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - } - TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - } -} - -/** rct2: 0x00824D8C */ -static void LayDownRCTrackLeftEighthToDiag( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftEighthToDiag); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26765), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26769), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26773), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26777), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26766), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26770), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 34, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26774), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26778), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26767), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26771), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26775), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26779), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26768), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26772), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 18, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26776), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26780), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824D9C */ -static void LayDownRCTrackRightEighthToDiag( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::RightEighthToDiag); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26749), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26753), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26757), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26761), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26750), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26754), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26758), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 34, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26762), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26751), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26755), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26759), { 0, 0, height + 24 }, - { { 4, 4, height + 22 }, { 28, 28, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26763), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26752), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26756), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26760), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 18, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26764), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824DAC */ -static void LayDownRCTrackLeftEighthToOrthogonal( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - LayDownRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824DBC */ -static void LayDownRCTrackRightEighthToOrthogonal( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - LayDownRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); -} - -/** rct2: 0x00824DCC */ -static void LayDownRCTrackLeftEighthBankToDiag( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftEighthBankToDiag); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26853), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26857), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26861), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26865), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26854), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26858), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 34, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26862), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26866), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26855), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26859), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26863), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26867), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26856), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26860), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 18, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26864), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26868), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824DDC */ -static void LayDownRCTrackRightEighthBankToDiag( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::RightEighthBankToDiag); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26837), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26841), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26845), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26849), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, - session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26838), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26842), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26846), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 34, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26850), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26839), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26843), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26847), { 0, 0, height + 24 }, - { { 4, 4, height + 22 }, { 28, 28, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26851), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26840), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26844), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26848), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 18, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26852), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824DEC */ -static void LayDownRCTrackLeftEighthBankToOrthogonal( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - LayDownRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -/** rct2: 0x00824DFC */ -static void LayDownRCTrackRightEighthBankToOrthogonal( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - LayDownRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); -} - -/** rct2: 0x00824D7C */ -static void LayDownRCTrackDiagFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26812), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26784), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26809), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26781), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26811), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26783), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26810), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26782), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -static void LayDownRCTrackDiagBrakes( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - int32_t blockedSegments = DiagBlockedSegments[trackSequence]; - if (trackElement.IsInverted()) - { - TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, session.TrackColours, LaydownDiagBrakeImages[1], - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 33, - session.SupportColours); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } - else - { - TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, LaydownDiagBrakeImages[0], - defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height, session.SupportColours); - } - - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -static void LayDownRCTrackDiagBlockBrakes( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - int32_t blockedSegments = DiagBlockedSegments[trackSequence]; - if (trackElement.IsInverted()) - { - TrackPaintUtilDiagTilesPaint( - session, -3, height + 24, direction, trackSequence, session.TrackColours, - LaydownDiagBlockBrakeImages[1][trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); - - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 33, - session.SupportColours); - } - PaintUtilSetGeneralSupportHeight(session, height + 33, 0x20); - } - else - { - TrackPaintUtilDiagTilesPaint( - session, 3, height, direction, trackSequence, session.TrackColours, - LaydownDiagBlockBrakeImages[0][trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, - nullptr); - - if (trackSequence == 3) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height, session.SupportColours); - } - - PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -/** rct2: 0x00824E2C */ -static void LayDownRCTrackDiag25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26824), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26796), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26821), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26793), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26823), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26795), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26822), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26794), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - } - } -} - -/** rct2: 0x00824E8C */ -static void LayDownRCTrackDiag60DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26808), { -16, -16, height + 24 }, - { { -16, -16, height + 88 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26805), { -16, -16, height + 24 }, - { { -16, -16, height + 88 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26807), { -16, -16, height + 24 }, - { { -16, -16, height + 88 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26806), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height + 33, - session.SupportColours); - break; - case 1: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height + 33, - session.SupportColours); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height + 33, - session.SupportColours); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - } - } -} - -/** rct2: 0x00824E0C */ -static void LayDownRCTrackDiagFlatTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagFlatToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26816), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26788), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26813), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26785), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26815), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26787), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26814), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26786), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } - } -} - -/** rct2: 0x00824E6C */ -static void LayDownRCTrackDiag25DegUpTo60DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp25ToUp60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26800), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26797), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26799), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26798), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height + 33, - session.SupportColours); - break; - case 1: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height + 33, - session.SupportColours); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height + 33, - session.SupportColours); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824E7C */ -static void LayDownRCTrackDiag60DegUpTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp60ToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26804), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26801), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26803), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26802), { -16, -16, height + 24 }, - { { 0, 0, height + 56 }, { 16, 16, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height + 33, - session.SupportColours); - break; - case 1: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height + 33, - session.SupportColours); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height + 33, - session.SupportColours); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824E1C */ -static void LayDownRCTrackDiag25DegUpToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp25ToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - if (trackElement.HasChain()) - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26820), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26792), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26817), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26789), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26819), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26791), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26818), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - else - { - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26790), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - } - } -} - -/** rct2: 0x00824E5C */ -static void LayDownRCTrackDiag25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26794), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26795), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26793), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26796), { -16, -16, height + 24 }, - { { -16, -16, height + 40 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - } - } -} - -/** rct2: 0x00824EBC */ -static void LayDownRCTrackDiag60DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26806), { -16, -16, height + 24 }, - { { -16, -16, height + 24 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26807), { -16, -16, height + 24 }, - { { -16, -16, height + 88 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26805), { -16, -16, height + 24 }, - { { -16, -16, height + 88 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26808), { -16, -16, height + 24 }, - { { -16, -16, height + 88 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height + 33, - session.SupportColours); - break; - case 1: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height + 33, - session.SupportColours); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height + 33, - session.SupportColours); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); - break; - } - } -} - -/** rct2: 0x00824E3C */ -static void LayDownRCTrackDiagFlatTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagFlatToDown25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26790), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26791), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26789), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26792), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); - break; - } - break; - } - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); -} - -/** rct2: 0x00824E9C */ -static void LayDownRCTrackDiag25DegDownTo60DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown25ToDown60); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26802), { -16, -16, height + 24 }, - { { 0, 0, height + 56 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26803), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26801), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26804), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height + 33, - session.SupportColours); - break; - case 1: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height + 33, - session.SupportColours); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height + 33, - session.SupportColours); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824EAC */ -static void LayDownRCTrackDiag60DegDownTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown60ToDown25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26798), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26799), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26797), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26800), { -16, -16, height + 24 }, - { { -16, -16, height + 56 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height + 33, - session.SupportColours); - break; - case 1: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height + 33, - session.SupportColours); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height + 33, - session.SupportColours); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - } - } -} - -/** rct2: 0x00824E4C */ -static void LayDownRCTrackDiag25DegDownToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown25ToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26786), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26787), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26785), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26788), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } - } -} - -/** rct2: 0x00824EEC */ -static void LayDownRCTrackDiagFlatToLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagFlatToLeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26876), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26873), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26875), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26874), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824EFC */ -static void LayDownRCTrackDiagFlatToRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagFlatToRightBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26880), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26877), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26879), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26878), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824F0C */ -static void LayDownRCTrackDiagLeftBankToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagLeftBankToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26878), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26879), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26877), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26880), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824F1C */ -static void LayDownRCTrackDiagRightBankToFlat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagRightBankToFlat); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26874), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26875), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26873), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26876), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824F4C */ -static void LayDownRCTrackDiagLeftBankTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagLeftBankToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26892), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26889), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26891), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26890), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } - } -} - -/** rct2: 0x00824F5C */ -static void LayDownRCTrackDiagRightBankTo25DegUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagRightBankToUp25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26896), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26893), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26895), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26894), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } - } -} - -/** rct2: 0x00824F2C */ -static void LayDownRCTrackDiag25DegUpToLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp25ToLeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26884), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26881), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26883), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26882), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - } - } -} - -/** rct2: 0x00824F3C */ -static void LayDownRCTrackDiag25DegUpToRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagUp25ToRightBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26888), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26885), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26887), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26886), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - } - } -} - -/** rct2: 0x00824F6C */ -static void LayDownRCTrackDiagLeftBankTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagLeftBankToDown25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26886), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26887), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26885), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26888), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); - break; - } - break; - } - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); -} - -/** rct2: 0x00824F7C */ -static void LayDownRCTrackDiagRightBankTo25DegDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagRightBankToDown25); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26882), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26883), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26881), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26884), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, - session.SupportColours); - break; - } - break; - } - } - - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); -} - -/** rct2: 0x00824F8C */ -static void LayDownRCTrackDiag25DegDownToLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown25ToLeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26894), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26895), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26893), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26896), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } - } -} - -/** rct2: 0x00824F9C */ -static void LayDownRCTrackDiag25DegDownToRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagDown25ToRightBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26890), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26891), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26889), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26892), { -16, -16, height + 24 }, - { { -16, -16, height + 32 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } - } -} - -/** rct2: 0x00824ECC */ -static void LayDownRCTrackDiagLeftBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagLeftBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26872), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26869), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26871), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26870), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824EDC */ -static void LayDownRCTrackDiagRightBank( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::DiagRightBank); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (trackSequence) - { - case 0: - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26870), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26871), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26869), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 3: - switch (direction) - { - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26872), { -16, -16, height + 24 }, - { { -16, -16, height + 22 }, { 32, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, - session.SupportColours); - break; - } - - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } - } -} - -/** rct2: 0x00824FCC */ -static void LayDownRCTrackLeftFlyerTwistDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26969), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26975), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26974), { 0, 6, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26980), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26970), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26976), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26973), { 0, 6, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26979), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26971), { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26977), { 0, 6, height }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26972), { 0, 6, height }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26978), { 0, 6, height }, { 32, 20, 3 }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } -} - -/** rct2: 0x00824FDC */ -static void LayDownRCTrackRightFlyerTwistDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26981), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26987), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26986), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26992), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26982), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26988), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26985), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26991), { 0, 6, height + 24 }, { 32, 20, 3 }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26983), { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26989), { 0, 6, height }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26984), { 0, 6, height }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26990), { 0, 6, height }, { 32, 20, 3 }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - } -} - -/** rct2: 0x00824C4C */ -static void LayDownRCTrackFlyerHalfLoopDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16597), { 0, 0, height + 32 }, { 32, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16605), { 0, 0, height + 32 }, { 32, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16598), { 0, 16, height + 32 }, { 32, 12, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16606), { 0, 16, height + 32 }, { 32, 12, 3 }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16596), { 16, 0, height }, { 2, 16, 119 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16604), { 12, 0, height }, - { { 12, 0, height }, { 3, 16, 119 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16599), { 10, 16, height }, { 4, 12, 119 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16607), { 16, 16, height }, - { { 15, 6, height }, { 2, 16, 119 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16595), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, - session.SupportColours); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16603), { 0, 14, height }, - { { 28, 6, height }, { 3, 20, 63 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 15, height, - session.SupportColours); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16600), { 0, 6, height }, - { { 28, 6, height }, { 3, 20, 63 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16608), { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, - session.SupportColours); - break; - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16594), { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16602), { 0, 6, height }, { 32, 20, 11 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16601), { 0, 6, height }, { 32, 20, 9 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16609), { 0, 6, height }, { 32, 20, 7 }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - } -} - -/** rct2: 0x00824C7C */ -static void LayDownRCTrackLeftFlyerCorkscrewDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16627), { 0, 0, height }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16630), { 0, 0, height }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16633), { 0, 0, height }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16624), { 0, 0, height }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16626), { 0, 0, height }, - { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16629), { 0, 0, height }, - { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16632), { 0, 0, height }, - { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16623), { 0, 0, height }, - { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16625), { 0, 0, height }, - { { 6, 0, height + 4 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16628), { 0, 0, height }, - { { 6, 0, height + 4 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16631), { 0, 0, height }, - { { 6, 0, height + 4 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(16622), { 0, 0, height }, - { { 6, 0, height + 4 }, { 20, 32, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } -} - -/** rct2: 0x00824C8C */ -static void LayDownRCTrackRightFlyerCorkscrewDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftFlyerCorkscrewUp); - function(session, ride, 2 - trackSequence, (direction + 3) % 4, height, trackElement); - return; -} - -/** rct2: 0x00824FEC */ -static void LayDownRCTrackBlockBrakes( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - if (!trackElement.IsInverted()) - { - auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::BlockBrakes); - function(session, ride, trackSequence, direction, height, trackElement); - return; - } - else - { - switch (direction) - { - case 0: - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26559), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 1: - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(26560), { 0, 0, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); - } - - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - } -} - -static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27118), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27123), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27128), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27113), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27117), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27122), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27127), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27112), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27116), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27121), { 0, 0, height + 24 }, - { { 16, 16, height + 38 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27126), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27111), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27115), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27120), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27125), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27110), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27114), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27119), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27124), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27109), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); - break; - case 3: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } -} - -static void LayDownRCTrackRightQuarterBankedHelixLargeUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27089), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27094), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27099), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27104), { 0, 0, height + 24 }, - { { 0, 6, height + 30 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27090), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27095), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27100), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27105), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27091), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27096), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27101), { 0, 0, height + 24 }, - { { 16, 16, height + 38 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27106), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27092), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27097), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27102), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27107), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27093), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27098), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27103), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27108), { 0, 0, height + 24 }, - { { 6, 0, height + 38 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); - - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); - break; - case 1: - PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } -} - -static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27098), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27103), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27108), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27093), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27097), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27102), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27107), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27092), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27096), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27101), { 0, 0, height + 24 }, - { { 16, 16, height + 38 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27106), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27091), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27095), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27100), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27105), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27090), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27094), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27099), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27104), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27089), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } -} - -static void LayDownRCTrackRightQuarterBankedHelixLargeDown( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27109), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27114), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27119), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27124), { 0, 0, height + 24 }, - { { 0, 6, height + 38 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27110), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27115), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27120), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27125), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27111), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27116), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27121), { 0, 0, height + 24 }, - { { 16, 16, height + 38 }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27126), { 0, 0, height + 24 }, - { { 0, 16, height + 38 }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 4: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27112), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27117), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27122), { 0, 0, height + 24 }, - { { 0, 0, height + 38 }, { 16, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27127), { 0, 0, height + 24 }, - { { 16, 0, height + 38 }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27113), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27118), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27123), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27128), { 0, 0, height + 24 }, - { { 6, 0, height + 30 }, { 20, 32, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); - - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); - break; - case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - } -} - -static void LayDownRCTrackHalfLoopInvertedUp( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - switch (trackSequence) - { - case 0: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27073), { 0, 6, height + 24 }, - { { 0, 6, height + 45 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27081), { 0, 6, height + 24 }, - { { 0, 6, height + 45 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27080), { 0, 6, height + 24 }, - { { 0, 6, height + 45 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27088), { 0, 6, height + 24 }, - { { 0, 6, height + 45 }, { 32, 20, 3 } }); - break; - } - - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 56, - session.SupportColours); - break; - case 1: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 56, - session.SupportColours); - break; - case 2: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 56, - session.SupportColours); - break; - case 3: - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 56, - session.SupportColours); - break; - } - - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27074), { 0, 0, height + 24 }, - { { 0, 29, height + 29 }, { 32, 2, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27082), { 0, 14, height + 24 }, - { { 0, 29, height + 29 }, { 32, 2, 63 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27079), { 0, 6, height + 24 }, - { { 0, 0, height + 29 }, { 32, 2, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27087), { 0, 6, height + 24 }, - { { 29, 20, height + 29 }, { 2, 2, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27075), { 16, 0, height - 3 }, - { { 16, 29, height + 2 }, { 5, 2, 119 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27083), { 12, 0, height - 3 }, - { { 0, -6, height + 2 }, { 32, 2, 119 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27078), { 10, 16, height - 3 }, - { { 10, 0, height + 2 }, { 4, 2, 119 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27086), { 16, 16, height - 3 }, - { { 29, 29, height + 2 }, { 2, 2, 119 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27076), { 0, 0, height + 29 }, - { { 0, 6, height + 34 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27084), { 0, 0, height + 29 }, - { { 0, 0, height - 6 }, { 2, 2, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27077), { 0, 16, height + 29 }, - { { 0, 0, height - 6 }, { 32, 2, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(27085), { 0, 16, height + 29 }, - { { 0, 6, height + 34 }, { 32, 20, 3 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - } -} - -TRACK_PAINT_FUNCTION GetTrackPaintFunctionLayDownRC(int32_t trackType) -{ - switch (trackType) - { - case TrackElemType::Flat: - return LayDownRCTrackFlat; - case TrackElemType::EndStation: - case TrackElemType::BeginStation: - case TrackElemType::MiddleStation: - return LayDownRCTrackStation; - case TrackElemType::Up25: - return LayDownRCTrack25DegUp; - case TrackElemType::Up60: - return LayDownRCTrack60DegUp; - case TrackElemType::FlatToUp25: - return LayDownRCTrackFlatTo25DegUp; - case TrackElemType::Up25ToUp60: - return LayDownRCTrack25DegUpTo60DegUp; - case TrackElemType::Up60ToUp25: - return LayDownRCTrack60DegUpTo25DegUp; - case TrackElemType::Up25ToFlat: - return LayDownRCTrack25DegUpToFlat; - case TrackElemType::Down25: - return LayDownRCTrack25DegDown; - case TrackElemType::Down60: - return LayDownRCTrack60DegDown; - case TrackElemType::FlatToDown25: - return LayDownRCTrackFlatTo25DegDown; - case TrackElemType::Down25ToDown60: - return LayDownRCTrack25DegDownTo60DegDown; - case TrackElemType::Down60ToDown25: - return LayDownRCTrack60DegDownTo25DegDown; - case TrackElemType::Down25ToFlat: - return LayDownRCTrack25DegDownToFlat; - case TrackElemType::LeftQuarterTurn5Tiles: - return LayDownRCTrackLeftQuarterTurn5; - case TrackElemType::RightQuarterTurn5Tiles: - return LayDownRCTrackRightQuarterTurn5; - case TrackElemType::FlatToLeftBank: - return LayDownRCTrackFlatToLeftBank; - case TrackElemType::FlatToRightBank: - return LayDownRCTrackFlatToRightBank; - case TrackElemType::LeftBankToFlat: - return LayDownRCTrackLeftBankToFlat; - case TrackElemType::RightBankToFlat: - return LayDownRCTrackRightBankToFlat; - case TrackElemType::BankedLeftQuarterTurn5Tiles: - return LayDownRCTrackBankedLeftQuarterTurn5; - case TrackElemType::BankedRightQuarterTurn5Tiles: - return LayDownRCTrackBankedRightQuarterTurn5; - case TrackElemType::LeftBankToUp25: - return LayDownRCTrackLeftBankTo25DegUp; - case TrackElemType::RightBankToUp25: - return LayDownRCTrackRightBankTo25DegUp; - case TrackElemType::Up25ToLeftBank: - return LayDownRCTrack25DegUpToLeftBank; - case TrackElemType::Up25ToRightBank: - return LayDownRCTrack25DegUpToRightBank; - case TrackElemType::LeftBankToDown25: - return LayDownRCTrackLeftBankTo25DegDown; - case TrackElemType::RightBankToDown25: - return LayDownRCTrackRightBankTo25DegDown; - case TrackElemType::Down25ToLeftBank: - return LayDownRCTrack25DegDownToLeftBank; - case TrackElemType::Down25ToRightBank: - return LayDownRCTrack25DegDownToRightBank; - case TrackElemType::LeftBank: - return LayDownRCTrackLeftBank; - case TrackElemType::RightBank: - return LayDownRCTrackRightBank; - case TrackElemType::LeftQuarterTurn5TilesUp25: - return LayDownRCTrackLeftQuarterTurn525DegUp; - case TrackElemType::RightQuarterTurn5TilesUp25: - return LayDownRCTrackRightQuarterTurn525DegUp; - case TrackElemType::LeftQuarterTurn5TilesDown25: - return LayDownRCTrackLeftQuarterTurn525DegDown; - case TrackElemType::RightQuarterTurn5TilesDown25: - return LayDownRCTrackRightQuarterTurn525DegDown; - case TrackElemType::SBendLeft: - return LayDownRCTrackSBendLeft; - case TrackElemType::SBendRight: - return LayDownRCTrackSBendRight; - case TrackElemType::LeftQuarterTurn3Tiles: - return LayDownRCTrackLeftQuarterTurn3; - case TrackElemType::RightQuarterTurn3Tiles: - return LayDownRCTrackRightQuarterTurn3; - case TrackElemType::LeftBankedQuarterTurn3Tiles: - return LayDownRCTrackLeftQuarterTurn3Bank; - case TrackElemType::RightBankedQuarterTurn3Tiles: - return LayDownRCTrackRightQuarterTurn3Bank; - case TrackElemType::LeftQuarterTurn3TilesUp25: - return LayDownRCTrackLeftQuarterTurn325DegUp; - case TrackElemType::RightQuarterTurn3TilesUp25: - return LayDownRCTrackRightQuarterTurn325DegUp; - case TrackElemType::LeftQuarterTurn3TilesDown25: - return LayDownRCTrackLeftQuarterTurn325DegDown; - case TrackElemType::RightQuarterTurn3TilesDown25: - return LayDownRCTrackRightQuarterTurn325DegDown; - case TrackElemType::LeftQuarterTurn1TileUp60: - return LayDownRCTrackLeftQuarterTurn160DegUp; - case TrackElemType::RightQuarterTurn1TileUp60: - return LayDownRCTrackRightQuarterTurn160DegUp; - case TrackElemType::LeftQuarterTurn1TileDown60: - return LayDownRCTrackLeftQuarterTurn160DegDown; - case TrackElemType::RightQuarterTurn1TileDown60: - return LayDownRCTrackRightQuarterTurn160DegDown; - case TrackElemType::Brakes: - return LayDownRCTrackBrakes; - case TrackElemType::OnRidePhoto: - return LayDownRCTrackOnRidePhoto; - case TrackElemType::LeftEighthToDiag: - return LayDownRCTrackLeftEighthToDiag; - case TrackElemType::RightEighthToDiag: - return LayDownRCTrackRightEighthToDiag; - case TrackElemType::LeftEighthToOrthogonal: - return LayDownRCTrackLeftEighthToOrthogonal; - case TrackElemType::RightEighthToOrthogonal: - return LayDownRCTrackRightEighthToOrthogonal; - case TrackElemType::LeftEighthBankToDiag: - return LayDownRCTrackLeftEighthBankToDiag; - case TrackElemType::RightEighthBankToDiag: - return LayDownRCTrackRightEighthBankToDiag; - case TrackElemType::LeftEighthBankToOrthogonal: - return LayDownRCTrackLeftEighthBankToOrthogonal; - case TrackElemType::RightEighthBankToOrthogonal: - return LayDownRCTrackRightEighthBankToOrthogonal; - case TrackElemType::DiagFlat: - return LayDownRCTrackDiagFlat; - case TrackElemType::DiagUp25: - return LayDownRCTrackDiag25DegUp; - case TrackElemType::DiagUp60: - return LayDownRCTrackDiag60DegUp; - case TrackElemType::DiagFlatToUp25: - return LayDownRCTrackDiagFlatTo25DegUp; - case TrackElemType::DiagUp25ToUp60: - return LayDownRCTrackDiag25DegUpTo60DegUp; - case TrackElemType::DiagUp60ToUp25: - return LayDownRCTrackDiag60DegUpTo25DegUp; - case TrackElemType::DiagUp25ToFlat: - return LayDownRCTrackDiag25DegUpToFlat; - case TrackElemType::DiagDown25: - return LayDownRCTrackDiag25DegDown; - case TrackElemType::DiagDown60: - return LayDownRCTrackDiag60DegDown; - case TrackElemType::DiagFlatToDown25: - return LayDownRCTrackDiagFlatTo25DegDown; - case TrackElemType::DiagDown25ToDown60: - return LayDownRCTrackDiag25DegDownTo60DegDown; - case TrackElemType::DiagDown60ToDown25: - return LayDownRCTrackDiag60DegDownTo25DegDown; - case TrackElemType::DiagDown25ToFlat: - return LayDownRCTrackDiag25DegDownToFlat; - case TrackElemType::DiagFlatToLeftBank: - return LayDownRCTrackDiagFlatToLeftBank; - case TrackElemType::DiagFlatToRightBank: - return LayDownRCTrackDiagFlatToRightBank; - case TrackElemType::DiagLeftBankToFlat: - return LayDownRCTrackDiagLeftBankToFlat; - case TrackElemType::DiagRightBankToFlat: - return LayDownRCTrackDiagRightBankToFlat; - case TrackElemType::DiagLeftBankToUp25: - return LayDownRCTrackDiagLeftBankTo25DegUp; - case TrackElemType::DiagRightBankToUp25: - return LayDownRCTrackDiagRightBankTo25DegUp; - case TrackElemType::DiagUp25ToLeftBank: - return LayDownRCTrackDiag25DegUpToLeftBank; - case TrackElemType::DiagUp25ToRightBank: - return LayDownRCTrackDiag25DegUpToRightBank; - case TrackElemType::DiagLeftBankToDown25: - return LayDownRCTrackDiagLeftBankTo25DegDown; - case TrackElemType::DiagRightBankToDown25: - return LayDownRCTrackDiagRightBankTo25DegDown; - case TrackElemType::DiagDown25ToLeftBank: - return LayDownRCTrackDiag25DegDownToLeftBank; - case TrackElemType::DiagDown25ToRightBank: - return LayDownRCTrackDiag25DegDownToRightBank; - case TrackElemType::DiagLeftBank: - return LayDownRCTrackDiagLeftBank; - case TrackElemType::DiagRightBank: - return LayDownRCTrackDiagRightBank; - case TrackElemType::BlockBrakes: - return LayDownRCTrackBlockBrakes; - case TrackElemType::DiagBrakes: - return LayDownRCTrackDiagBrakes; - case TrackElemType::DiagBlockBrakes: - return LayDownRCTrackDiagBlockBrakes; - - // Inverted only - case TrackElemType::LeftFlyerTwistDown: - return LayDownRCTrackLeftFlyerTwistDown; - case TrackElemType::RightFlyerTwistDown: - return LayDownRCTrackRightFlyerTwistDown; - case TrackElemType::FlyerHalfLoopInvertedDown: - return LayDownRCTrackFlyerHalfLoopDown; - case TrackElemType::LeftFlyerCorkscrewDown: - return LayDownRCTrackLeftFlyerCorkscrewDown; - case TrackElemType::RightFlyerCorkscrewDown: - return LayDownRCTrackRightFlyerCorkscrewDown; - case TrackElemType::LeftQuarterBankedHelixLargeUp: - return LayDownRCTrackLeftQuarterBankedHelixLargeUp; - case TrackElemType::RightQuarterBankedHelixLargeUp: - return LayDownRCTrackRightQuarterBankedHelixLargeUp; - case TrackElemType::LeftQuarterBankedHelixLargeDown: - return LayDownRCTrackLeftQuarterBankedHelixLargeDown; - case TrackElemType::RightQuarterBankedHelixLargeDown: - return LayDownRCTrackRightQuarterBankedHelixLargeDown; - case TrackElemType::FlyerHalfLoopInvertedUp: - return LayDownRCTrackHalfLoopInvertedUp; - } - return GetTrackPaintFunctionCorkscrewRC(trackType); -} diff --git a/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp b/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp new file mode 100644 index 0000000000..b9712a4112 --- /dev/null +++ b/src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp @@ -0,0 +1,8884 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#include "../../drawing/Drawing.h" +#include "../../interface/Viewport.h" +#include "../../paint/Paint.h" +#include "../../paint/support/MetalSupports.h" +#include "../../paint/tile_element/Paint.TileElement.h" +#include "../../sprites.h" +#include "../../world/Map.h" +#include "../RideData.h" +#include "../TrackData.h" +#include "../TrackPaint.h" +static constexpr const uint32_t LaydownDiagBrakeImages[NumOrthogonalDirections] = { + SPR_G2_SLC_DIAG_BRAKES, + SPR_G2_SLC_DIAG_BRAKES + 2, + SPR_G2_SLC_DIAG_BRAKES, + SPR_G2_SLC_DIAG_BRAKES + 2, +}; + +static constexpr const uint32_t LaydownDiagBlockBrakeImages[2][NumOrthogonalDirections] = { + { + SPR_G2_SLC_DIAG_BRAKES, + SPR_G2_SLC_DIAG_BRAKES + 2, + SPR_G2_SLC_DIAG_BRAKES, + SPR_G2_SLC_DIAG_BRAKES + 2, + }, + { + SPR_G2_SLC_DIAG_BRAKES, + SPR_G2_SLC_DIAG_BRAKES + 1, + SPR_G2_SLC_DIAG_BRAKES, + SPR_G2_SLC_DIAG_BRAKES + 1, + }, +}; + +/** rct2: 0x0082491C */ +static void LayDownRCTrackFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26557), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); + break; + case 1: + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26558), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26555), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); + break; + case 1: + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26556), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824B8C, 0x00824B9C, 0x00824BAC */ +static void LayDownRCTrackStation( + PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + static constexpr uint32_t imageIds[4][3] = { + { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, + { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, + { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, + { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, + }; + + PaintAddImageAsParentRotated( + session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, + { { 0, 2, height }, { 32, 28, 1 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 1 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::TubesInverted); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x0082492C */ +static void LayDownRCTrack25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26621), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26622), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26623), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26624), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26569), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26570), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26571), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26572), { 0, 0, height + 24 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 51, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 51, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 51, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 51, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + } + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); +} + +/** rct2: 0x0082493C */ +static void LayDownRCTrack60DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26585), { 0, 0, height + 24 }, + { { 0, 6, height + 88 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26586), { 0, 0, height + 24 }, + { { 0, 4, height + 6 }, { 32, 2, 81 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26587), { 0, 0, height + 24 }, + { { 0, 4, height + 6 }, { 32, 2, 81 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26588), { 0, 0, height + 24 }, + { { 0, 6, height + 88 }, { 32, 20, 3 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 56, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); +} + +/** rct2: 0x0082494C */ +static void LayDownRCTrackFlatTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26613), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26614), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26615), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26616), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26561), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26562), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26563), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26564), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 43, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 43, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 43, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 43, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); +} + +/** rct2: 0x0082495C */ +static void LayDownRCTrack25DegUpTo60DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26573), { 0, 0, height + 24 }, + { { 0, 6, height + 56 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26577), { 0, 0, height + 24 }, + { { 0, 10, height + 6 }, { 32, 10, 49 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26574), { 0, 0, height + 24 }, + { { 0, 4, height + 6 }, { 32, 2, 49 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26578), { 0, 0, height + 24 }, + { { 0, 10, height + 6 }, { 32, 10, 49 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26575), { 0, 0, height + 24 }, + { { 0, 4, height + 6 }, { 32, 2, 49 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26576), { 0, 0, height + 24 }, + { { 0, 6, height + 56 }, { 32, 20, 3 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); +} + +/** rct2: 0x0082496C */ +static void LayDownRCTrack60DegUpTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26579), { 0, 0, height + 24 }, + { { 0, 6, height + 56 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26583), { 0, 0, height + 24 }, + { { 0, 10, height + 6 }, { 32, 10, 49 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26580), { 0, 0, height + 24 }, + { { 0, 4, height + 6 }, { 32, 2, 49 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26584), { 0, 0, height + 24 }, + { { 0, 10, height + 6 }, { 32, 10, 49 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26581), { 0, 0, height + 24 }, + { { 0, 4, height + 6 }, { 32, 2, 49 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26582), { 0, 0, height + 24 }, + { { 0, 6, height + 56 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 65, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 65, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 65, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 65, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); +} + +/** rct2: 0x0082497C */ +static void LayDownRCTrack25DegUpToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26617), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26618), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26619), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26620), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26565), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26566), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26567), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26568), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + } + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); +} + +/** rct2: 0x0082498C */ +static void LayDownRCTrack25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x0082499C */ +static void LayDownRCTrack60DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x008249AC */ +static void LayDownRCTrackFlatTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x008249BC */ +static void LayDownRCTrack25DegDownTo60DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x008249CC */ +static void LayDownRCTrack60DegDownTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x008249DC */ +static void LayDownRCTrack25DegDownToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x008249EC */ +static void LayDownRCTrackLeftQuarterTurn5( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26694), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26699), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26704), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26689), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26693), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26698), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26703), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26688), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26692), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26697), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26702), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26687), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26691), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26696), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26701), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26686), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26690), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26695), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26700), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26685), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x008249FC */ +static void LayDownRCTrackRightQuarterTurn5( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + LayDownRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824A0C */ +static void LayDownRCTrackFlatToLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26657), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26658), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26659), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26660), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824A1C */ +static void LayDownRCTrackFlatToRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26661), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26662), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26663), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26664), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824A2C */ +static void LayDownRCTrackLeftBankToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26663), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26664), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26661), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26662), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824A3C */ +static void LayDownRCTrackRightBankToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26659), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26660), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26657), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26658), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824A4C */ +static void LayDownRCTrackBankedLeftQuarterTurn5( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26738), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26743), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26748), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26733), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26737), { 0, 0, height + 24 }, { 32, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26742), { 0, 0, height + 24 }, { 32, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26747), { 0, 0, height + 24 }, + { { 0, 16, height + 24 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26732), { 0, 0, height + 24 }, + { { 0, 16, height + 24 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26736), { 0, 0, height + 24 }, + { { 0, 16, height + 24 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26741), { 0, 0, height + 24 }, + { { 16, 16, height + 24 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26746), { 0, 0, height + 24 }, + { { 16, 0, height + 24 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26731), { 0, 0, height + 24 }, { 16, 16, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26735), { 0, 0, height + 24 }, + { { 16, 0, height + 24 }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26740), { 0, 0, height + 24 }, { 16, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26745), { 0, 0, height + 24 }, { 16, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26730), { 0, 0, height + 24 }, + { { 16, 0, height + 24 }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26734), { 0, 0, height + 24 }, + { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26739), { 0, 0, height + 24 }, + { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26744), { 0, 0, height + 24 }, + { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26729), { 0, 0, height + 24 }, + { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824A5C */ +static void LayDownRCTrackBankedRightQuarterTurn5( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + LayDownRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824A6C */ +static void LayDownRCTrackLeftBankTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26665), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26666), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26667), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26668), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); +} + +/** rct2: 0x00824A7C */ +static void LayDownRCTrackRightBankTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26669), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26670), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26671), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26672), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); +} + +/** rct2: 0x00824A8C */ +static void LayDownRCTrack25DegUpToLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26673), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26674), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26675), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26676), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + } + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); +} + +/** rct2: 0x00824A9C */ +static void LayDownRCTrack25DegUpToRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26677), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26678), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26679), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26680), { 0, 0, height + 24 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 41, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 41, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 41, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 41, + session.SupportColours); + break; + } + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_12); + } + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); +} + +/** rct2: 0x00824AAC */ +static void LayDownRCTrackLeftBankTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824ABC */ +static void LayDownRCTrackRightBankTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824ACC */ +static void LayDownRCTrack25DegDownToLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824ADC */ +static void LayDownRCTrack25DegDownToRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824AEC */ +static void LayDownRCTrackLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26681), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26682), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26683), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26684), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824AFC */ +static void LayDownRCTrackRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824B0C */ +static void LayDownRCTrackLeftQuarterTurn525DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26949), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26954), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26959), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26964), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26950), { 0, 0, height + 24 }, { 32, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26955), { 0, 0, height + 24 }, { 32, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26960), { 0, 16, height + 24 }, { 32, 16, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26965), { 0, 16, height + 24 }, { 32, 16, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26951), { 0, 16, height + 24 }, { 16, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26956), { 16, 16, height + 24 }, { 16, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26961), { 16, 0, height + 24 }, { 16, 16, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26966), { 0, 0, height + 24 }, { 16, 16, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26952), { 16, 0, height + 24 }, { 16, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26957), { 0, 0, height + 24 }, { 16, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26962), { 0, 0, height + 24 }, { 16, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26967), { 16, 0, height + 24 }, { 16, 32, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26953), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26958), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26963), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26968), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + break; + case 3: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824B1C */ +static void LayDownRCTrackRightQuarterTurn525DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26929), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26934), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26939), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26944), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26930), { 0, 16, height + 24 }, { 32, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26935), { 0, 16, height + 24 }, { 32, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26940), { 0, 0, height + 24 }, { 32, 16, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26945), { 0, 0, height + 24 }, { 32, 16, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26931), { 0, 0, height + 24 }, { 16, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26936), { 16, 0, height + 24 }, { 16, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26941), { 16, 16, height + 24 }, { 16, 16, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26946), { 0, 16, height + 24 }, { 16, 16, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26932), { 16, 0, height + 24 }, { 16, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26937), { 0, 0, height + 24 }, { 16, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26942), { 0, 0, height + 24 }, { 16, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26947), { 16, 0, height + 24 }, { 16, 32, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26933), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26938), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26943), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26948), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 43, session.SupportColours); + + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + break; + case 1: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824B2C */ +static void LayDownRCTrackLeftQuarterTurn525DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + LayDownRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); +} + +/** rct2: 0x00824B3C */ +static void LayDownRCTrackRightQuarterTurn525DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; + LayDownRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824B4C */ +static void LayDownRCTrackSBendLeft( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26641), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26645), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26644), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26648), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26642), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26646), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26643), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26647), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26643), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26647), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26642), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26646), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26644), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26648), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26641), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26645), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824B5C */ +static void LayDownRCTrackSBendRight( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26649), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26653), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26652), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26656), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26650), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26654), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26651), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26655), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26651), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26655), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 26, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26650), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26654), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 26, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26652), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26656), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26649), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26653), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824BBC */ +static void LayDownRCTrackLeftQuarterTurn3( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26710), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26713), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26716), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26707), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26709), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26712), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26715), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26706), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26708), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26711), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26714), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26705), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824BCC */ +static void LayDownRCTrackRightQuarterTurn3( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + LayDownRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824BDC */ +static void LayDownRCTrackLeftQuarterTurn3Bank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26722), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26725), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26728), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26719), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26721), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26724), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26727), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26718), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26720), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26723), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26726), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26717), { 0, 0, height + 24 }, + { { 6, 0, height + 22 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824BEC */ +static void LayDownRCTrackRightQuarterTurn3Bank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + LayDownRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824BFC */ +static void LayDownRCTrackLeftQuarterTurn325DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26924), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26926), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26928), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26922), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26923), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26925), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26927), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26921), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + break; + case 3: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824C0C */ +static void LayDownRCTrackRightQuarterTurn325DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26913), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26915), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26917), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26919), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26914), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26916), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26918), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26920), { 6, 0, height + 24 }, { 20, 32, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 41, session.SupportColours); + + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); + break; + case 1: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824C1C */ +static void LayDownRCTrackLeftQuarterTurn325DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + LayDownRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); +} + +/** rct2: 0x00824C2C */ +static void LayDownRCTrackRightQuarterTurn325DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; + LayDownRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824D3C */ +static void LayDownRCTrackLeftQuarterTurn160DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26910), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26906), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26911), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26907), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26912), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26908), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26909), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26905), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + } + + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); +} + +/** rct2: 0x00824D1C */ +static void LayDownRCTrackRightQuarterTurn160DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26901), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26897), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26902), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26898), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26903), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26899), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26904), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26900), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); + break; + } + + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); +} + +/** rct2: 0x00824D2C */ +static void LayDownRCTrackLeftQuarterTurn160DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); +} + +/** rct2: 0x00824D4C */ +static void LayDownRCTrackRightQuarterTurn160DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + LayDownRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); +} + +/** rct2: 0x00824D5C */ +static void LayDownRCTrackBrakes( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26559), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 1: + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26560), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +/** rct2: 0x00824D6C */ +static void LayDownRCTrackOnRidePhoto( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26555), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26556), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26555), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26556), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + } + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); +} + +/** rct2: 0x00824D8C */ +static void LayDownRCTrackLeftEighthToDiag( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26765), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26769), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26773), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26777), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26766), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26770), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 34, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26774), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26778), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26767), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26771), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26775), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26779), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26768), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26772), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 18, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26776), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26780), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824D9C */ +static void LayDownRCTrackRightEighthToDiag( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26749), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26753), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26757), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26761), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26750), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26754), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26758), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 34, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26762), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26751), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26755), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26759), { 0, 0, height + 24 }, + { { 4, 4, height + 22 }, { 28, 28, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26763), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26752), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26756), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26760), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 18, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26764), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824DAC */ +static void LayDownRCTrackLeftEighthToOrthogonal( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + LayDownRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824DBC */ +static void LayDownRCTrackRightEighthToOrthogonal( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + LayDownRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); +} + +/** rct2: 0x00824DCC */ +static void LayDownRCTrackLeftEighthBankToDiag( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26853), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26857), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26861), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26865), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26854), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26858), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 34, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26862), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26866), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26855), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26859), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26863), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26867), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26856), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26860), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 18, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26864), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26868), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824DDC */ +static void LayDownRCTrackRightEighthBankToDiag( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26837), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26841), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26845), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26849), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26838), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26842), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26846), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 34, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26850), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26839), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26843), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26847), { 0, 0, height + 24 }, + { { 4, 4, height + 22 }, { 28, 28, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26851), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26840), { 0, 0, height + 24 }, + { { 16, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26844), { 0, 0, height + 24 }, + { { 0, 0, height + 22 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26848), { 0, 0, height + 24 }, + { { 0, 16, height + 22 }, { 16, 18, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26852), { 0, 0, height + 24 }, + { { 16, 16, height + 22 }, { 16, 16, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824DEC */ +static void LayDownRCTrackLeftEighthBankToOrthogonal( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + LayDownRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +/** rct2: 0x00824DFC */ +static void LayDownRCTrackRightEighthBankToOrthogonal( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + LayDownRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); +} + +/** rct2: 0x00824D7C */ +static void LayDownRCTrackDiagFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26812), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26784), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26809), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26781), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26811), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26783), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26810), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26782), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +static void LayDownRCTrackDiagBrakes( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; + + TrackPaintUtilDiagTilesPaint( + session, -3, height + 24, direction, trackSequence, session.TrackColours, LaydownDiagBrakeImages, + defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); + + if (trackSequence == 3) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 33, session.SupportColours); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +static void LayDownRCTrackDiagBlockBrakes( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; + + TrackPaintUtilDiagTilesPaint( + session, -3, height + 24, direction, trackSequence, session.TrackColours, + LaydownDiagBlockBrakeImages[trackElement.IsBrakeClosed()], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); + + PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); + + if (trackSequence == 3) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, DiagSupportPlacement[direction], 0, height + 33, session.SupportColours); + } + PaintUtilSetGeneralSupportHeight(session, height + 33, 0x20); +} + +/** rct2: 0x00824E2C */ +static void LayDownRCTrackDiag25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26824), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26796), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26821), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26793), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26823), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26795), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26822), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26794), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } +} + +/** rct2: 0x00824E8C */ +static void LayDownRCTrackDiag60DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26808), { -16, -16, height + 24 }, + { { -16, -16, height + 88 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26805), { -16, -16, height + 24 }, + { { -16, -16, height + 88 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26807), { -16, -16, height + 24 }, + { { -16, -16, height + 88 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26806), { -16, -16, height + 24 }, + { { -16, -16, height + 24 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 32, height + 33, + session.SupportColours); + break; + case 1: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 36, height + 33, + session.SupportColours); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 32, height + 33, + session.SupportColours); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 36, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + } +} + +/** rct2: 0x00824E0C */ +static void LayDownRCTrackDiagFlatTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26816), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26788), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26813), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26785), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26815), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26787), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26814), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26786), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824E6C */ +static void LayDownRCTrackDiag25DegUpTo60DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26800), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26797), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26799), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26798), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 16, height + 33, + session.SupportColours); + break; + case 1: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 16, height + 33, + session.SupportColours); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 16, height + 33, + session.SupportColours); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 16, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824E7C */ +static void LayDownRCTrackDiag60DegUpTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26804), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26801), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26803), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26802), { -16, -16, height + 24 }, + { { 0, 0, height + 56 }, { 16, 16, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 21, height + 33, + session.SupportColours); + break; + case 1: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 21, height + 33, + session.SupportColours); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 21, height + 33, + session.SupportColours); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 21, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824E1C */ +static void LayDownRCTrackDiag25DegUpToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26820), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26792), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26817), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26789), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26819), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26791), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26818), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + else + { + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26790), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } +} + +/** rct2: 0x00824E5C */ +static void LayDownRCTrackDiag25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26794), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26795), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26793), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26796), { -16, -16, height + 24 }, + { { -16, -16, height + 40 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 45, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 45, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 45, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 45, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } +} + +/** rct2: 0x00824EBC */ +static void LayDownRCTrackDiag60DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26806), { -16, -16, height + 24 }, + { { -16, -16, height + 24 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26807), { -16, -16, height + 24 }, + { { -16, -16, height + 88 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26805), { -16, -16, height + 24 }, + { { -16, -16, height + 88 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26808), { -16, -16, height + 24 }, + { { -16, -16, height + 88 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 24, height + 33, + session.SupportColours); + break; + case 1: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 28, height + 33, + session.SupportColours); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 24, height + 33, + session.SupportColours); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 28, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); + break; + } +} + +/** rct2: 0x00824E3C */ +static void LayDownRCTrackDiagFlatTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26790), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26791), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26789), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26792), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, + session.SupportColours); + break; + } + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); +} + +/** rct2: 0x00824E9C */ +static void LayDownRCTrackDiag25DegDownTo60DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26802), { -16, -16, height + 24 }, + { { 0, 0, height + 56 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26803), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26801), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26804), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 17, height + 33, + session.SupportColours); + break; + case 1: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 17, height + 33, + session.SupportColours); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 17, height + 33, + session.SupportColours); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 17, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824EAC */ +static void LayDownRCTrackDiag60DegDownTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26798), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26799), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26797), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26800), { -16, -16, height + 24 }, + { { -16, -16, height + 56 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 8, height + 33, + session.SupportColours); + break; + case 1: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 8, height + 33, + session.SupportColours); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 8, height + 33, + session.SupportColours); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 8, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } +} + +/** rct2: 0x00824E4C */ +static void LayDownRCTrackDiag25DegDownToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26786), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26787), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26785), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26788), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824EEC */ +static void LayDownRCTrackDiagFlatToLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26876), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26873), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26875), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26874), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824EFC */ +static void LayDownRCTrackDiagFlatToRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26880), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26877), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26879), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26878), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824F0C */ +static void LayDownRCTrackDiagLeftBankToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26878), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26879), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26877), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26880), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824F1C */ +static void LayDownRCTrackDiagRightBankToFlat( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26874), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26875), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26873), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26876), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824F4C */ +static void LayDownRCTrackDiagLeftBankTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26892), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26889), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26891), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26890), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824F5C */ +static void LayDownRCTrackDiagRightBankTo25DegUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26896), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26893), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26895), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26894), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824F2C */ +static void LayDownRCTrackDiag25DegUpToLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26884), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26881), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26883), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26882), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } +} + +/** rct2: 0x00824F3C */ +static void LayDownRCTrackDiag25DegUpToRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26888), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26885), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26887), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26886), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } +} + +/** rct2: 0x00824F6C */ +static void LayDownRCTrackDiagLeftBankTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26886), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26887), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26885), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26888), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, + session.SupportColours); + break; + } + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); +} + +/** rct2: 0x00824F7C */ +static void LayDownRCTrackDiagRightBankTo25DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26882), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26883), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26881), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26884), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 39, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 39, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 39, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 39, + session.SupportColours); + break; + } + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); +} + +/** rct2: 0x00824F8C */ +static void LayDownRCTrackDiag25DegDownToLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26894), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26895), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26893), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26896), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824F9C */ +static void LayDownRCTrackDiag25DegDownToRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26890), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26891), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26889), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26892), { -16, -16, height + 24 }, + { { -16, -16, height + 32 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 37, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 37, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 37, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 37, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824ECC */ +static void LayDownRCTrackDiagLeftBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26872), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26869), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26871), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26870), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824EDC */ +static void LayDownRCTrackDiagRightBank( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26870), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26871), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26869), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 3: + switch (direction) + { + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26872), { -16, -16, height + 24 }, + { { -16, -16, height + 22 }, { 32, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::LeftCorner, 0, height + 33, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopCorner, 0, height + 33, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::RightCorner, 0, height + 33, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomCorner, 0, height + 33, + session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824FCC */ +static void LayDownRCTrackLeftFlyerTwistDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26969), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26975), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26974), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26980), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26970), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26976), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26973), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26979), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26971), { 0, 6, height }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26977), { 0, 6, height }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26972), { 0, 6, height }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26978), { 0, 6, height }, { 32, 20, 3 }); + break; + } + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824FDC */ +static void LayDownRCTrackRightFlyerTwistDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26981), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26987), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26986), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26992), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26982), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26988), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26985), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26991), { 0, 6, height + 24 }, { 32, 20, 3 }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26983), { 0, 6, height }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26989), { 0, 6, height }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26984), { 0, 6, height }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26990), { 0, 6, height }, { 32, 20, 3 }); + break; + } + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + } +} + +/** rct2: 0x00824C4C */ +static void LayDownRCTrackFlyerHalfLoopDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16597), { 0, 0, height + 32 }, { 32, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16605), { 0, 0, height + 32 }, { 32, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16598), { 0, 16, height + 32 }, { 32, 12, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16606), { 0, 16, height + 32 }, { 32, 12, 3 }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16596), { 16, 0, height }, { 2, 16, 119 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16604), { 12, 0, height }, + { { 12, 0, height }, { 3, 16, 119 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16599), { 10, 16, height }, { 4, 12, 119 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16607), { 16, 16, height }, + { { 15, 6, height }, { 2, 16, 119 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16595), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 20, height, + session.SupportColours); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16603), { 0, 14, height }, + { { 28, 6, height }, { 3, 20, 63 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 15, height, + session.SupportColours); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16600), { 0, 6, height }, + { { 28, 6, height }, { 3, 20, 63 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, + session.SupportColours); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16608), { 0, 6, height }, { 32, 20, 3 }); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 16, height, + session.SupportColours); + break; + } + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16594), { 0, 6, height }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16602), { 0, 6, height }, { 32, 20, 11 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16601), { 0, 6, height }, { 32, 20, 9 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16609), { 0, 6, height }, { 32, 20, 7 }); + break; + } + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 8, height, session.SupportColours); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } +} + +/** rct2: 0x00824C7C */ +static void LayDownRCTrackLeftFlyerCorkscrewDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16627), { 0, 0, height }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16630), { 0, 0, height }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16633), { 0, 0, height }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16624), { 0, 0, height }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 35, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16626), { 0, 0, height }, + { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16629), { 0, 0, height }, + { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16632), { 0, 0, height }, + { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16623), { 0, 0, height }, + { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16625), { 0, 0, height }, + { { 6, 0, height + 4 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16628), { 0, 0, height }, + { { 6, 0, height + 4 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16631), { 0, 0, height }, + { { 6, 0, height + 4 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(16622), { 0, 0, height }, + { { 6, 0, height + 4 }, { 20, 32, 3 } }); + break; + } + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height, session.SupportColours); + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +/** rct2: 0x00824C8C */ +static void LayDownRCTrackRightFlyerCorkscrewDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftFlyerCorkscrewUp); + function(session, ride, 2 - trackSequence, (direction + 3) % 4, height, trackElement); + return; +} + +/** rct2: 0x00824FEC */ +static void LayDownRCTrackBlockBrakes( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (direction) + { + case 0: + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26559), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 1: + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(26560), { 0, 0, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 33, session.SupportColours); + } + + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); +} + +static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27118), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27123), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27128), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27113), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27117), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27122), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27127), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27112), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27116), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27121), { 0, 0, height + 24 }, + { { 16, 16, height + 38 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27126), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27111), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27115), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27120), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27125), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27110), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27114), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27119), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27124), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27109), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + break; + case 3: + PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +static void LayDownRCTrackRightQuarterBankedHelixLargeUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27089), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27094), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27099), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27104), { 0, 0, height + 24 }, + { { 0, 6, height + 30 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27090), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27095), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27100), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27105), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27091), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27096), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27101), { 0, 0, height + 24 }, + { { 16, 16, height + 38 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27106), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27092), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27097), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27102), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27107), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27093), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27098), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27103), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27108), { 0, 0, height + 24 }, + { { 6, 0, height + 38 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height + 16, TUNNEL_INVERTED_3); + break; + case 1: + PaintUtilPushTunnelLeft(session, height + 16, TUNNEL_INVERTED_3); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27098), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27103), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27108), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27093), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27097), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27102), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27107), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27092), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27096), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27101), { 0, 0, height + 24 }, + { { 16, 16, height + 38 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27106), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27091), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27095), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27100), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27105), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27090), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27094), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27099), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27104), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27089), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +static void LayDownRCTrackRightQuarterBankedHelixLargeDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27109), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27114), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27119), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27124), { 0, 0, height + 24 }, + { { 0, 6, height + 38 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 51, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_INVERTED_3); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27110), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27115), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27120), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27125), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27111), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27116), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27121), { 0, 0, height + 24 }, + { { 16, 16, height + 38 }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27126), { 0, 0, height + 24 }, + { { 0, 16, height + 38 }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 4: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27112), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27117), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27122), { 0, 0, height + 24 }, + { { 0, 0, height + 38 }, { 16, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27127), { 0, 0, height + 24 }, + { { 16, 0, height + 38 }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27113), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27118), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27123), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27128), { 0, 0, height + 24 }, + { { 6, 0, height + 30 }, { 20, 32, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::Centre, 0, height + 39, session.SupportColours); + + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + break; + case 1: + PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } +} + +static void LayDownRCTrackHalfLoopInvertedUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27073), { 0, 6, height + 24 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27081), { 0, 6, height + 24 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27080), { 0, 6, height + 24 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27088), { 0, 6, height + 24 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height + 56, + session.SupportColours); + break; + case 1: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height + 56, + session.SupportColours); + break; + case 2: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height + 56, + session.SupportColours); + break; + case 3: + MetalASupportsPaintSetup( + session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height + 56, + session.SupportColours); + break; + } + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27074), { 0, 0, height + 24 }, + { { 0, 29, height + 29 }, { 32, 2, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27082), { 0, 14, height + 24 }, + { { 0, 29, height + 29 }, { 32, 2, 63 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27079), { 0, 6, height + 24 }, + { { 0, 0, height + 29 }, { 32, 2, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27087), { 0, 6, height + 24 }, + { { 29, 20, height + 29 }, { 2, 2, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27075), { 16, 0, height - 3 }, + { { 16, 29, height + 2 }, { 5, 2, 119 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27083), { 12, 0, height - 3 }, + { { 0, -6, height + 2 }, { 32, 2, 119 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27078), { 10, 16, height - 3 }, + { { 10, 0, height + 2 }, { 4, 2, 119 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27086), { 16, 16, height - 3 }, + { { 29, 29, height + 2 }, { 2, 2, 119 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27076), { 0, 0, height + 29 }, + { { 0, 6, height + 34 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27084), { 0, 0, height + 29 }, + { { 0, 0, height - 6 }, { 2, 2, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27077), { 0, 16, height + 29 }, + { { 0, 0, height - 6 }, { 32, 2, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(27085), { 0, 16, height + 29 }, + { { 0, 6, height + 34 }, { 32, 20, 3 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 32, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } +} + +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLayDownRCInverted(int32_t trackType) +{ + switch (trackType) + { + case TrackElemType::Flat: + return LayDownRCTrackFlat; + case TrackElemType::EndStation: + case TrackElemType::BeginStation: + case TrackElemType::MiddleStation: + return LayDownRCTrackStation; + case TrackElemType::Up25: + return LayDownRCTrack25DegUp; + case TrackElemType::Up60: + return LayDownRCTrack60DegUp; + case TrackElemType::FlatToUp25: + return LayDownRCTrackFlatTo25DegUp; + case TrackElemType::Up25ToUp60: + return LayDownRCTrack25DegUpTo60DegUp; + case TrackElemType::Up60ToUp25: + return LayDownRCTrack60DegUpTo25DegUp; + case TrackElemType::Up25ToFlat: + return LayDownRCTrack25DegUpToFlat; + case TrackElemType::Down25: + return LayDownRCTrack25DegDown; + case TrackElemType::Down60: + return LayDownRCTrack60DegDown; + case TrackElemType::FlatToDown25: + return LayDownRCTrackFlatTo25DegDown; + case TrackElemType::Down25ToDown60: + return LayDownRCTrack25DegDownTo60DegDown; + case TrackElemType::Down60ToDown25: + return LayDownRCTrack60DegDownTo25DegDown; + case TrackElemType::Down25ToFlat: + return LayDownRCTrack25DegDownToFlat; + case TrackElemType::LeftQuarterTurn5Tiles: + return LayDownRCTrackLeftQuarterTurn5; + case TrackElemType::RightQuarterTurn5Tiles: + return LayDownRCTrackRightQuarterTurn5; + case TrackElemType::FlatToLeftBank: + return LayDownRCTrackFlatToLeftBank; + case TrackElemType::FlatToRightBank: + return LayDownRCTrackFlatToRightBank; + case TrackElemType::LeftBankToFlat: + return LayDownRCTrackLeftBankToFlat; + case TrackElemType::RightBankToFlat: + return LayDownRCTrackRightBankToFlat; + case TrackElemType::BankedLeftQuarterTurn5Tiles: + return LayDownRCTrackBankedLeftQuarterTurn5; + case TrackElemType::BankedRightQuarterTurn5Tiles: + return LayDownRCTrackBankedRightQuarterTurn5; + case TrackElemType::LeftBankToUp25: + return LayDownRCTrackLeftBankTo25DegUp; + case TrackElemType::RightBankToUp25: + return LayDownRCTrackRightBankTo25DegUp; + case TrackElemType::Up25ToLeftBank: + return LayDownRCTrack25DegUpToLeftBank; + case TrackElemType::Up25ToRightBank: + return LayDownRCTrack25DegUpToRightBank; + case TrackElemType::LeftBankToDown25: + return LayDownRCTrackLeftBankTo25DegDown; + case TrackElemType::RightBankToDown25: + return LayDownRCTrackRightBankTo25DegDown; + case TrackElemType::Down25ToLeftBank: + return LayDownRCTrack25DegDownToLeftBank; + case TrackElemType::Down25ToRightBank: + return LayDownRCTrack25DegDownToRightBank; + case TrackElemType::LeftBank: + return LayDownRCTrackLeftBank; + case TrackElemType::RightBank: + return LayDownRCTrackRightBank; + case TrackElemType::LeftQuarterTurn5TilesUp25: + return LayDownRCTrackLeftQuarterTurn525DegUp; + case TrackElemType::RightQuarterTurn5TilesUp25: + return LayDownRCTrackRightQuarterTurn525DegUp; + case TrackElemType::LeftQuarterTurn5TilesDown25: + return LayDownRCTrackLeftQuarterTurn525DegDown; + case TrackElemType::RightQuarterTurn5TilesDown25: + return LayDownRCTrackRightQuarterTurn525DegDown; + case TrackElemType::SBendLeft: + return LayDownRCTrackSBendLeft; + case TrackElemType::SBendRight: + return LayDownRCTrackSBendRight; + case TrackElemType::LeftQuarterTurn3Tiles: + return LayDownRCTrackLeftQuarterTurn3; + case TrackElemType::RightQuarterTurn3Tiles: + return LayDownRCTrackRightQuarterTurn3; + case TrackElemType::LeftBankedQuarterTurn3Tiles: + return LayDownRCTrackLeftQuarterTurn3Bank; + case TrackElemType::RightBankedQuarterTurn3Tiles: + return LayDownRCTrackRightQuarterTurn3Bank; + case TrackElemType::LeftQuarterTurn3TilesUp25: + return LayDownRCTrackLeftQuarterTurn325DegUp; + case TrackElemType::RightQuarterTurn3TilesUp25: + return LayDownRCTrackRightQuarterTurn325DegUp; + case TrackElemType::LeftQuarterTurn3TilesDown25: + return LayDownRCTrackLeftQuarterTurn325DegDown; + case TrackElemType::RightQuarterTurn3TilesDown25: + return LayDownRCTrackRightQuarterTurn325DegDown; + case TrackElemType::LeftQuarterTurn1TileUp60: + return LayDownRCTrackLeftQuarterTurn160DegUp; + case TrackElemType::RightQuarterTurn1TileUp60: + return LayDownRCTrackRightQuarterTurn160DegUp; + case TrackElemType::LeftQuarterTurn1TileDown60: + return LayDownRCTrackLeftQuarterTurn160DegDown; + case TrackElemType::RightQuarterTurn1TileDown60: + return LayDownRCTrackRightQuarterTurn160DegDown; + case TrackElemType::Brakes: + return LayDownRCTrackBrakes; + case TrackElemType::OnRidePhoto: + return LayDownRCTrackOnRidePhoto; + case TrackElemType::LeftEighthToDiag: + return LayDownRCTrackLeftEighthToDiag; + case TrackElemType::RightEighthToDiag: + return LayDownRCTrackRightEighthToDiag; + case TrackElemType::LeftEighthToOrthogonal: + return LayDownRCTrackLeftEighthToOrthogonal; + case TrackElemType::RightEighthToOrthogonal: + return LayDownRCTrackRightEighthToOrthogonal; + case TrackElemType::LeftEighthBankToDiag: + return LayDownRCTrackLeftEighthBankToDiag; + case TrackElemType::RightEighthBankToDiag: + return LayDownRCTrackRightEighthBankToDiag; + case TrackElemType::LeftEighthBankToOrthogonal: + return LayDownRCTrackLeftEighthBankToOrthogonal; + case TrackElemType::RightEighthBankToOrthogonal: + return LayDownRCTrackRightEighthBankToOrthogonal; + case TrackElemType::DiagFlat: + return LayDownRCTrackDiagFlat; + case TrackElemType::DiagUp25: + return LayDownRCTrackDiag25DegUp; + case TrackElemType::DiagUp60: + return LayDownRCTrackDiag60DegUp; + case TrackElemType::DiagFlatToUp25: + return LayDownRCTrackDiagFlatTo25DegUp; + case TrackElemType::DiagUp25ToUp60: + return LayDownRCTrackDiag25DegUpTo60DegUp; + case TrackElemType::DiagUp60ToUp25: + return LayDownRCTrackDiag60DegUpTo25DegUp; + case TrackElemType::DiagUp25ToFlat: + return LayDownRCTrackDiag25DegUpToFlat; + case TrackElemType::DiagDown25: + return LayDownRCTrackDiag25DegDown; + case TrackElemType::DiagDown60: + return LayDownRCTrackDiag60DegDown; + case TrackElemType::DiagFlatToDown25: + return LayDownRCTrackDiagFlatTo25DegDown; + case TrackElemType::DiagDown25ToDown60: + return LayDownRCTrackDiag25DegDownTo60DegDown; + case TrackElemType::DiagDown60ToDown25: + return LayDownRCTrackDiag60DegDownTo25DegDown; + case TrackElemType::DiagDown25ToFlat: + return LayDownRCTrackDiag25DegDownToFlat; + case TrackElemType::DiagFlatToLeftBank: + return LayDownRCTrackDiagFlatToLeftBank; + case TrackElemType::DiagFlatToRightBank: + return LayDownRCTrackDiagFlatToRightBank; + case TrackElemType::DiagLeftBankToFlat: + return LayDownRCTrackDiagLeftBankToFlat; + case TrackElemType::DiagRightBankToFlat: + return LayDownRCTrackDiagRightBankToFlat; + case TrackElemType::DiagLeftBankToUp25: + return LayDownRCTrackDiagLeftBankTo25DegUp; + case TrackElemType::DiagRightBankToUp25: + return LayDownRCTrackDiagRightBankTo25DegUp; + case TrackElemType::DiagUp25ToLeftBank: + return LayDownRCTrackDiag25DegUpToLeftBank; + case TrackElemType::DiagUp25ToRightBank: + return LayDownRCTrackDiag25DegUpToRightBank; + case TrackElemType::DiagLeftBankToDown25: + return LayDownRCTrackDiagLeftBankTo25DegDown; + case TrackElemType::DiagRightBankToDown25: + return LayDownRCTrackDiagRightBankTo25DegDown; + case TrackElemType::DiagDown25ToLeftBank: + return LayDownRCTrackDiag25DegDownToLeftBank; + case TrackElemType::DiagDown25ToRightBank: + return LayDownRCTrackDiag25DegDownToRightBank; + case TrackElemType::DiagLeftBank: + return LayDownRCTrackDiagLeftBank; + case TrackElemType::DiagRightBank: + return LayDownRCTrackDiagRightBank; + case TrackElemType::BlockBrakes: + return LayDownRCTrackBlockBrakes; + case TrackElemType::DiagBrakes: + return LayDownRCTrackDiagBrakes; + case TrackElemType::DiagBlockBrakes: + return LayDownRCTrackDiagBlockBrakes; + + case TrackElemType::LeftFlyerTwistDown: + return LayDownRCTrackLeftFlyerTwistDown; + case TrackElemType::RightFlyerTwistDown: + return LayDownRCTrackRightFlyerTwistDown; + case TrackElemType::FlyerHalfLoopInvertedDown: + return LayDownRCTrackFlyerHalfLoopDown; + case TrackElemType::LeftFlyerCorkscrewDown: + return LayDownRCTrackLeftFlyerCorkscrewDown; + case TrackElemType::RightFlyerCorkscrewDown: + return LayDownRCTrackRightFlyerCorkscrewDown; + case TrackElemType::LeftQuarterBankedHelixLargeUp: + return LayDownRCTrackLeftQuarterBankedHelixLargeUp; + case TrackElemType::RightQuarterBankedHelixLargeUp: + return LayDownRCTrackRightQuarterBankedHelixLargeUp; + case TrackElemType::LeftQuarterBankedHelixLargeDown: + return LayDownRCTrackLeftQuarterBankedHelixLargeDown; + case TrackElemType::RightQuarterBankedHelixLargeDown: + return LayDownRCTrackRightQuarterBankedHelixLargeDown; + case TrackElemType::FlyerHalfLoopInvertedUp: + return LayDownRCTrackHalfLoopInvertedUp; + } + return nullptr; +} diff --git a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h index 342a1d5e68..3616f3d6dc 100644 --- a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h @@ -21,14 +21,14 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = .StartTrackPiece = TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor( { - .Drawer = GetTrackPaintFunctionLayDownRC, + .Drawer = GetTrackPaintFunctionCorkscrewRC, .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_CORKSCREW_UNINVERTED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES }, .ExtraTrackPieces = { TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_BOOSTER }, } ), .InvertedTrackPaintFunctions = TrackDrawerDescriptor( { - .Drawer = GetTrackPaintFunctionLayDownRC, + .Drawer = GetTrackPaintFunctionLayDownRCInverted, .EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_QUARTER, TRACK_HELIX_UP_BANKED_QUARTER, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_INVERTED, TRACK_FLYING_HALF_LOOP_INVERTED_DOWN, TRACK_CORKSCREW_INVERTED }, .ExtraTrackPieces = { TRACK_FLYING_HALF_LOOP_INVERTED_UP, TRACK_STATION_END, TRACK_LIFT_HILL }, }