diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index 822db1e15c..f761bb44d2 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -9410,861 +9410,779 @@ static void GigaRCTrackPoweredLift( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } - - static void GigaRCTrack90DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 8)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 9)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 10)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 11)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); - break; - } - PaintUtilSetVerticalTunnel(session, height + 32); - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 8)), + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 9)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 10)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 11)), + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); + break; + } + PaintUtilSetVerticalTunnel(session, height + 32); + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + break; + } } static void GigaRCTrack90DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrack60DegUpTo90DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 1)), - { 0, 0, height }, { { 24, 6, height }, { 2, 20, 55 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 2)), - { 0, 0, height }, { { 24, 6, height }, { 2, 20, 55 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 3)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) - { - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 36, height, session.TrackColours[SCHEME_SUPPORTS]); - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetVerticalTunnel(session, height + 56); - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 0)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 1)), + { 0, 0, height }, { { 24, 6, height }, { 2, 20, 55 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 2)), + { 0, 0, height }, { { 24, 6, height }, { 2, 20, 55 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 3)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 36, height, session.TrackColours[SCHEME_SUPPORTS]); + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetVerticalTunnel(session, height + 56); + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + break; + } } static void GigaRCTrack90DegDownTo60DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrack90DegUpTo60DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 4)), - { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 5)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 6)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 7)), - { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); - break; -} -switch (direction) -{ - case 1: - PaintUtilPushTunnelRight(session, height + 48, TUNNEL_2); - break; - case 2: - PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_2); - break; -} -PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); -PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 4)), + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 5)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 6)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 7)), + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height + 48, TUNNEL_2); + break; + case 2: + PaintUtilPushTunnelLeft(session, height + 48, TUNNEL_2); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); } static void GigaRCTrack60DegDownTo90DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 6)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 7)), - { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 4)), - { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 5)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); - break; - case 1: - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 6)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 7)), + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 4)), + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL + 5)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 48, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); + break; + case 1: + break; + } } static void GigaRCTrackLeftQuarterTurn190DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 0)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 1)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 2)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 3)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 4)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 5)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - } - PaintUtilSetVerticalTunnel(session, height + 96); - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); - break; - case 1: - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 0)), { 0, 0, height }, + { { 4, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 1)), { 0, 0, height }, + { { 4, 6, height + 8 }, { 2, 20, 63 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 2)), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 3)), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 4)), { 0, 0, height }, + { { 4, 6, height + 8 }, { 2, 20, 63 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 5)), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + } + PaintUtilSetVerticalTunnel(session, height + 96); + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + break; + case 1: + break; + } } static void GigaRCTrackRightQuarterTurn190DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 6)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 7)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 8)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 9)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 10)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 11)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); - break; - } - PaintUtilSetVerticalTunnel(session, height + 96); - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); - break; - case 1: - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 6)), { 0, 0, height }, + { { 4, 6, height + 8 }, { 2, 20, 63 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 7)), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 8)), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 9)), { 0, 0, height }, + { { 4, 6, height + 8 }, { 2, 20, 63 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 10)), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_VERTICAL_TWIST + 11)), { 0, 0, height }, + { { 4, 6, height + 8 }, { 2, 20, 63 } }); + break; + } + PaintUtilSetVerticalTunnel(session, height + 96); + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 96, 0x20); + break; + case 1: + break; + } } static void GigaRCTrackLeftQuarterTurn190DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightQuarterTurn190DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightQuarterTurn190DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } static void GigaRCTrackRightQuarterTurn190DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftQuarterTurn190DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn190DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } static void GigaRCTrackLeftBarrelRollUpToDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 1)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 6)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 7)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 12)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 13)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 18)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 19)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 2)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 3)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 8)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 9)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 14)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 15)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 20)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 21)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 4)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 5)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 10)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 11)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 16)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 17)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 22)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 23)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - } - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); - break; - case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 0)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 1)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 6)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 7)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 12)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 13)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 18)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 19)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 2)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 3)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 8)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 9)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 14)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 15)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 20)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 21)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 4)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 5)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 10)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 11)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 17)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 22)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 23)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + break; + case 2: + PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackRightBarrelRollUpToDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 24)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 25)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 30)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 31)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 36)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 37)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 42)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 43)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 26)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 27)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 32)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 33)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 38)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 39)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 44)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 45)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 28)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 29)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 34)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 35)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 40)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 41)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 46)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 47)), - { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); - break; - } - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); - break; - case 2: - PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 24)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 25)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 30)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 31)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 36)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 37)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 42)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 43)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height - 2, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 26)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 27)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 32)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 33)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 38)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 39)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 44)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 45)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 28)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 29)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 34)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 35)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 40)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 41)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 46)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_BARREL_ROLL + 47)), + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height, TUNNEL_INVERTED_3); + break; + case 2: + PaintUtilPushTunnelLeft(session, height, TUNNEL_INVERTED_3); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackLeftBarrelRollDownToUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftBarrelRollUpToDown(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBarrelRollUpToDown(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackRightBarrelRollDownToUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightBarrelRollUpToDown(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightBarrelRollUpToDown(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackHalfLoopUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 0)), - { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 4)), - { 0, 6, height }, { 32, 20, 11 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 8)), - { 0, 6, height }, { 32, 20, 9 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 12)), - { 0, 6, height }, { 32, 20, 7 }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 1)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 5)), - { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 9)), - { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 13)), - { 0, 6, height }, { 32, 20, 3 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 2)), - { 16, 0, height }, { 2, 16, 119 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 6)), - { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 10)), - { 10, 16, height }, { 4, 12, 119 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 14)), - { 16, 16, height }, { { 15, 6, height }, { 2, 16, 119 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 3)), - { 0, 0, height + 32 }, { 32, 16, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 7)), - { 0, 0, height + 32 }, { 32, 16, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 11)), - { 0, 16, height + 32 }, { 32, 12, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 15)), - { 0, 16, height + 32 }, { 32, 12, 3 }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 0)), + { 0, 6, height }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 4)), + { 0, 6, height }, { 32, 20, 11 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 8)), + { 0, 6, height }, { 32, 20, 9 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 12)), + { 0, 6, height }, { 32, 20, 7 }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 1)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 5)), + { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 9)), + { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 13)), + { 0, 6, height }, { 32, 20, 3 }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 2)), + { 16, 0, height }, { 2, 16, 119 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 6)), + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 10)), + { 10, 16, height }, { 4, 12, 119 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 14)), + { 16, 16, height }, { { 15, 6, height }, { 2, 16, 119 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 3)), + { 0, 0, height + 32 }, { 32, 16, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 7)), + { 0, 0, height + 32 }, { 32, 16, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 11)), + { 0, 16, height + 32 }, { 32, 12, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_HALF_LOOP + 15)), + { 0, 16, height + 32 }, { 32, 12, 3 }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackHalfLoopDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); + GigaRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } - static void GigaRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) @@ -10276,29 +10194,29 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 0), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 0), + { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 4), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 4), + { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 8), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 8), + { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 12), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 12), + { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10318,23 +10236,23 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 1), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 1), + { 0, 0, height }, { 32, 26, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 5), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 5), + { 0, 14, height }, { 32, 2, 63 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 9), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 9), + { 0, 6, height }, { 32, 26, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 13), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 13), + { 0, 6, height }, { 32, 26, 3 }); break; } PaintUtilSetSegmentSupportHeight( @@ -10348,23 +10266,23 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 2), { 16, 0, height }, - { { 16, 0, height }, { 3, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 2), + { 16, 0, height }, { { 16, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 6), { 12, 0, height }, - { { 12, 0, height }, { 3, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 6), + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 10), { 10, 16, height }, - { { 10, 16, height }, { 4, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 10), + { 10, 16, height }, { { 10, 16, height }, { 4, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 14), { 16, 16, height }, - { { 16, 16, height }, { 2, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 14), + { 16, 16, height }, { { 16, 16, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10376,23 +10294,23 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 3), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 3), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 7), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 7), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 11), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 11), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 15), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 15), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; } PaintUtilSetSegmentSupportHeight( @@ -10412,23 +10330,23 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 11), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 11), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 15), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 15), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 3), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 3), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 7), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 7), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; } PaintUtilSetSegmentSupportHeight( @@ -10442,23 +10360,23 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 10), { 10, 16, height }, - { { 10, 16, height }, { 4, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 10), + { 10, 16, height }, { { 10, 16, height }, { 4, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 14), { 16, 16, height }, - { { 16, 16, height }, { 2, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 14), + { 16, 16, height }, { { 16, 16, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 2), { 16, 0, height }, - { { 16, 0, height }, { 3, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 2), + { 16, 0, height }, { { 16, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 6), { 12, 0, height }, - { { 12, 0, height }, { 3, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 6), + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10470,23 +10388,23 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 9), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 9), + { 0, 6, height }, { 32, 26, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 13), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 13), + { 0, 6, height }, { 32, 26, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 1), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 1), + { 0, 0, height }, { 32, 26, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 5), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 5), + { 0, 14, height }, { 32, 2, 63 }); break; } PaintUtilSetSegmentSupportHeight( @@ -10500,29 +10418,29 @@ static void GigaRCTrackLeftVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 8), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 8), + { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 12), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 12), + { 0, 6, height }, { 32, 20, 7 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 0), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 0), + { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 4), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 4), + { 0, 6, height }, { 32, 20, 3 }); MetalASupportsPaintSetup( session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10556,23 +10474,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 16), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 16), + { 0, 6, height }, { 32, 20, 7 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 20), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 20), + { 0, 6, height }, { 32, 20, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 24), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 24), + { 0, 6, height }, { 32, 20, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 28), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 28), + { 0, 6, height }, { 32, 20, 3 }); break; } MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10587,23 +10505,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 17), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 17), + { 0, 6, height }, { 32, 26, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 21), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 21), + { 0, 6, height }, { 32, 26, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 25), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 25), + { 0, 14, height }, { 32, 2, 63 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 29), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 29), + { 0, 0, height }, { 32, 26, 3 }); break; } PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); @@ -10613,23 +10531,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 18), { 16, 16, height }, - { { 16, 16, height }, { 2, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 18), + { 16, 16, height }, { { 16, 16, height }, { 2, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 22), { 10, 16, height }, - { { 10, 16, height }, { 4, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 22), + { 10, 16, height }, { { 10, 16, height }, { 4, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 26), { 12, 0, height }, - { { 12, 0, height }, { 3, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 26), + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 30), { 16, 0, height }, - { { 16, 0, height }, { 2, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 30), + { 16, 0, height }, { { 16, 0, height }, { 2, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -10639,23 +10557,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 19), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 19), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 23), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 23), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 27), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 27), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 31), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 31), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; } PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -10671,23 +10589,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 27), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 27), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 31), { 0, 0, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 31), + { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 19), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 19), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 23), { 0, 16, height + 32 }, - { 32, 16, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 23), + { 0, 16, height + 32 }, { 32, 16, 3 }); break; } PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -10697,23 +10615,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 26), { 12, 0, height }, - { { 12, 0, height }, { 3, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 26), + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 30), { 16, 0, height }, - { { 16, 0, height }, { 2, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 30), + { 16, 0, height }, { { 16, 0, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 18), { 16, 16, height }, - { { 16, 16, height }, { 2, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 18), + { 16, 16, height }, { { 16, 16, height }, { 2, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 22), { 10, 16, height }, - { { 10, 16, height }, { 4, 16, 119 } }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 22), + { 10, 16, height }, { { 10, 16, height }, { 4, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -10723,23 +10641,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 25), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 25), + { 0, 14, height }, { 32, 2, 63 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 29), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 29), + { 0, 0, height }, { 32, 26, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 17), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 17), + { 0, 6, height }, { 32, 26, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 21), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 21), + { 0, 6, height }, { 32, 26, 3 }); break; } PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); @@ -10749,23 +10667,23 @@ static void GigaRCTrackRightVerticalLoop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 24), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 24), + { 0, 6, height }, { 32, 20, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 28), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 28), + { 0, 6, height }, { 32, 20, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 16), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 16), + { 0, 6, height }, { 32, 20, 7 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 20), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_TRACK_VERTICAL_LOOP + 20), + { 0, 6, height }, { 32, 20, 3 }); break; } MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10785,6495 +10703,6237 @@ static void GigaRCTrackRightVerticalLoop( TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } - - - static void GigaRCTrackLeftCorkscrewUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 0)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 3)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 6)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 9)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 0)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 3)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 6)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 9)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 1)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 4)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 7)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 10)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 2)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 5)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 8)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 11)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 1)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 4)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 7)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 10)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 2)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 5)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 8)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 11)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 40, session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 40, session.TrackColours[SCHEME_SUPPORTS]); - - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackRightCorkscrewUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 12)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 15)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 18)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 21)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 13)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 16)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 19)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 22)), - { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 14)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 17)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 20)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 23)), - { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 12)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 15)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 18)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 21)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 13)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 16)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 19)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 22)), + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 14)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 17)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 20)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_CORKSCREW + 23)), + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 40, session.TrackColours[SCHEME_SUPPORTS]); + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 40, session.TrackColours[SCHEME_SUPPORTS]); - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 1: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackLeftCorkscrewDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } static void GigaRCTrackRightCorkscrewDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } static void GigaRCTrackLeftLargeCorkscrewUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 0)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 5)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 10)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 15)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 0)), { 0, 0, height }, + { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 5)), { 0, 0, height }, + { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 10)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 15)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 1)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 6)), - { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 19, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 11)), - { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 19, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 16)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 2)), - { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 7)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 12)), - { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 17)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 4: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 3)), - { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 8)), - { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 13)), - { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 18)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 1)), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 6)), { 0, 0, height }, + { { 0, 29, height }, { 26, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 19, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 11)), + { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 19, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 2)), { 0, 0, height }, + { { 0, 31, height }, { 48, 1, 64 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 7)), { 0, 0, height }, + { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 12)), + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 17)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 4: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 3)), { 0, 0, height }, + { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 8)), { 0, 0, height }, + { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 13)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 18)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 4)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 9)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 14)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 19)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); - break; - } + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 4)), { 0, 0, height }, + { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 9)), { 0, 0, height }, + { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 14)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 19)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), - 0xFFFF, 0); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), + 0xFFFF, 0); + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackRightLargeCorkscrewUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 20)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 25)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 30)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 35)), - { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 20)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 25)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 30)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 35)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_D4 | SEGMENT_C4 | SEGMENT_BC | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 21)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 26)), - { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 19, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 31)), - { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 19, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 36)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 22)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 27)), - { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 32)), - { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 37)), - { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 4: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 23)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 28)), - { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 33)), - { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 38)), - { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 24)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 29)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 34)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 39)), - { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); - break; - } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_D4 | SEGMENT_C4 | SEGMENT_BC | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 21)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 26)), + { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 19, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 31)), + { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 19, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 36)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 22)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 27)), + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 32)), + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 37)), + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 4: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 23)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 28)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 33)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 38)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 0, height + 65, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 24)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 29)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 34)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_CORKSCREW + 39)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 1: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 1: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackLeftLargeCorkscrewDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightLargeCorkscrewUp(session, ride, 5 - trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightLargeCorkscrewUp(session, ride, 5 - trackSequence, (direction + 1) & 3, height, trackElement); } static void GigaRCTrackRightLargeCorkscrewDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftLargeCorkscrewUp(session, ride, 5 - trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftLargeCorkscrewUp(session, ride, 5 - trackSequence, (direction - 1) & 3, height, trackElement); } static void GigaRCTrackLeftMediumHalfLoopUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 5)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 10)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 15)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 0)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 5)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 10)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 15)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 1)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 6)), - { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 11)), - { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 16)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 1)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 6)), + { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 11)), + { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_B4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 2)), - { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 14, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 7)), - { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 12)), - { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 18, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 17)), - { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 3)), - { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 8)), - { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 13)), - { 0, 0, height }, { { 29, 0, height }, { 1, 32, 160 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 18)), - { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_D4 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 4)), - { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 9)), - { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 14)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 19)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - break; - } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_B4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 2)), + { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 14, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 7)), + { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 12)), + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 18, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 17)), + { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 3)), + { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 8)), + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 13)), + { 0, 0, height }, { { 29, 0, height }, { 1, 32, 160 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 18)), + { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_D4 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 4)), + { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 9)), + { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 14)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 19)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_CC | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC, direction), - 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_CC | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC, direction), + 0xFFFF, 0); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackRightMediumHalfLoopUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 20)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 25)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 30)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 35)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 20)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 25)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 30)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 35)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 21)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 26)), - { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 31)), - { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 36)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 21)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 26)), + { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 31)), + { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 36)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_CC | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 22)), - { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 14, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 27)), - { 0, 0, height }, { { 30, 0, height }, { 0, 32, 96 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 32)), - { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 37)), - { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 14, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_D4 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 23)), - { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 28)), - { 0, 0, height }, { { 29, 0, height }, { 0, 32, 160 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 33)), - { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 38)), - { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); - break; - } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_CC | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 22)), + { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 14, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 27)), + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 96 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 32)), + { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 37)), + { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 14, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_D4 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 23)), + { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 28)), + { 0, 0, height }, { { 29, 0, height }, { 0, 32, 160 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 33)), + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 38)), + { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 24)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 29)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 34)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 39)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - break; - } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 144, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 24)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 29)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 34)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_MEDIUM_HALF_LOOP + 39)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_B4, direction), - 0xFFFF, 0); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); - } - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_B4, direction), + 0xFFFF, 0); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 16, TUNNEL_0); + } + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackLeftMediumHalfLoopDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightMediumHalfLoopUp(session, ride, 4 - trackSequence, direction, height, trackElement); + GigaRCTrackRightMediumHalfLoopUp(session, ride, 4 - trackSequence, direction, height, trackElement); } static void GigaRCTrackRightMediumHalfLoopDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftMediumHalfLoopUp(session, ride, 4 - trackSequence, direction, height, trackElement); + GigaRCTrackLeftMediumHalfLoopUp(session, ride, 4 - trackSequence, direction, height, trackElement); } static void GigaRCTrackLeftZeroGRollUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 1)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 4)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 5)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 8)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 12)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 0)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 1)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 4)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 5)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 8)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 12)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 2)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 6)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 9)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 13)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 3)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 7)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 10)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 11)), - { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 14)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 15)), - { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); - break; - } - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 42, session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; -} + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 2)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 6)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 9)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 13)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 3)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 7)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 10)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 11)), + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 14)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 15)), + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 42, session.TrackColours[SCHEME_SUPPORTS]); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + } } static void GigaRCTrackRightZeroGRollUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 16)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 20)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 24)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 25)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 28)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 29)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 17)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 21)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 26)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 30)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 18)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 19)), - { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 22)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 23)), - { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 27)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 31)), - { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); - break; - } - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), - 0xFFFF, 0); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 42, session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 20)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 24)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 25)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 28)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 29)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 17)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 21)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 26)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 30)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 18)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 19)), + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 22)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 23)), + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 27)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_ZERO_G_ROLL + 31)), + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), + 0xFFFF, 0); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 42, session.TrackColours[SCHEME_SUPPORTS]); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + } } static void GigaRCTrackLeftZeroGRollDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftZeroGRollUp(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftZeroGRollUp(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackRightZeroGRollDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightZeroGRollUp(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightZeroGRollUp(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackLeftLargeZeroGRollUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 5)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 9)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 10)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 15)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 21, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 1)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 2)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 6)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 11)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 16)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 3)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 7)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 12)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 17)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 18)), - { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 4)), - { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 8)), - { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 13)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 14)), - { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 19)), - { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 0)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 5)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 9)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 10)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 15)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 21, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 1)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 2)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 6)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 11)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 3)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 7)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 12)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 17)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 18)), + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4 | SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 4)), + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 8)), + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 13)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 14)), + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 19)), + { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + } } static void GigaRCTrackRightLargeZeroGRollUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 20)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 25)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 26)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 31)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 35)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 21, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 21)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 27)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 32)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 36)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 37)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 22)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 23)), - { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 28)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 33)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 38)), - { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); - break; - } + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 20)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 25)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 26)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 31)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 35)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 21, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 21)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 27)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 32)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 36)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 37)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 22)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 23)), + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 28)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 33)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 38)), + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); + break; + } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 24)), - { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 29)), - { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 30)), - { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 34)), - { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 39)), - { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - switch (direction) - { - case 1: - PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); - break; - case 2: - PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); - break; - } - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; -} + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 24)), + { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 29)), + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 30)), + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 34)), + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_ZERO_G_ROLL + 39)), + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 0, height + 37, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + switch (direction) + { + case 1: + PaintUtilPushTunnelRight(session, height + 8, TUNNEL_0); + break; + case 2: + PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_0); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + } } static void GigaRCTrackLeftLargeZeroGRollDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftLargeZeroGRollUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftLargeZeroGRollUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackRightLargeZeroGRollDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightLargeZeroGRollUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightLargeZeroGRollUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrack90DegToInvertedFlatQuarterLoopUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 0)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 3)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 6)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 9)), - { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 1)), - { 0, 0, height }, { { -8, 6, height }, { 2, 20, 31 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 4)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 7)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 10)), - { 0, 0, height }, { { -8, 6, height }, { 2, 20, 31 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 2)), - { 0, 0, height }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 5)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 8)), - { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 11)), - { 0, 0, height }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 0)), + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 3)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 6)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 9)), + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 1)), + { 0, 0, height }, { { -8, 6, height }, { 2, 20, 31 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 4)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 7)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 10)), + { 0, 0, height }, { { -8, 6, height }, { 2, 20, 31 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 2)), + { 0, 0, height }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 5)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 8)), + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_QUARTER_LOOP + 11)), + { 0, 0, height }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackInvertedFlatTo90DegQuarterLoopDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrack90DegToInvertedFlatQuarterLoopUp(session, ride, 2 - trackSequence, direction, height, trackElement); + GigaRCTrack90DegToInvertedFlatQuarterLoopUp(session, ride, 2 - trackSequence, direction, height, trackElement); } static void GigaRCTrackLeftBankToLeftQuarterTurn3Tile25DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 0)), - { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 2)), - { 0, 6, height }, { 32, 20, 3 }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 3)), - { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 5)), - { 0, 6, height }, { 32, 20, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 7)), - { 0, 6, height }, { 32, 20, 3 }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 1)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 4)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 6)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 8)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 0)), + { 0, 6, height }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 2)), + { 0, 6, height }, { 32, 20, 3 }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 3)), + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 5)), + { 0, 6, height }, { 32, 20, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 7)), + { 0, 6, height }, { 32, 20, 3 }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 1)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 4)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 6)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 8)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_2); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } } static void GigaRCTrackRightBankToRightQuarterTurn3Tile25DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 9)), - { 0, 6, height }, { 32, 20, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 11)), - { 0, 6, height }, { 32, 20, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 13)), - { 0, 6, height }, { 32, 20, 3 }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 14)), - { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 16)), - { 0, 6, height }, { 32, 20, 3 }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 10)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 12)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 15)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 17)), - { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_2); - break; - case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_2); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 9)), + { 0, 6, height }, { 32, 20, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 11)), + { 0, 6, height }, { 32, 20, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 13)), + { 0, 6, height }, { 32, 20, 3 }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 14)), + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 16)), + { 0, 6, height }, { 32, 20, 3 }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 10)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 12)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 15)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 17)), + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height, TUNNEL_2); + break; + case 1: + PaintUtilPushTunnelLeft(session, height, TUNNEL_2); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } } static void GigaRCTrackLeftQuarterTurn3Tile25DegDownToLeftBank( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 12)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 15)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 17)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 10)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 11)), - { 6, 0, height }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 13)), - { 6, 0, height }, { 20, 32, 3 }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 14)), - { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 16)), - { 6, 0, height }, { 20, 32, 3 }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 9)), - { 6, 0, height }, { 20, 32, 3 }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - switch (direction) - { - case 2: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 3: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 12)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 15)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 17)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 10)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 11)), + { 6, 0, height }, { 20, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 13)), + { 6, 0, height }, { 20, 32, 3 }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 14)), + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 16)), + { 6, 0, height }, { 20, 32, 3 }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 9)), + { 6, 0, height }, { 20, 32, 3 }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 3: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } } static void GigaRCTrackRightQuarterTurn3Tile25DegDownToRightBank( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 8)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 1)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 4)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 6)), - { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 1: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 7)), - { 6, 0, height }, { 20, 32, 3 }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 0)), - { 6, 0, height }, { 20, 32, 3 }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 2)), - { 6, 0, height }, { 20, 32, 3 }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 3)), - { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 5)), - { 6, 0, height }, { 20, 32, 3 }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - switch (direction) - { - case 0: - PaintUtilPushTunnelRight(session, height, TUNNEL_0); - break; - case 1: - PaintUtilPushTunnelLeft(session, height, TUNNEL_0); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 8)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 1)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 4)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 6)), + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 1: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 7)), + { 6, 0, height }, { 20, 32, 3 }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 0)), + { 6, 0, height }, { 20, 32, 3 }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 2)), + { 6, 0, height }, { 20, 32, 3 }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 3)), + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_TURN_BANK_TRANSITION + 5)), + { 6, 0, height }, { 20, 32, 3 }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height, TUNNEL_0); + break; + case 1: + PaintUtilPushTunnelLeft(session, height, TUNNEL_0); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } } static void GigaRCTrackLeftLargeHalfLoopUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 7)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 14)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 21)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 1)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 8)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 15)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 22)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 2)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 9)), - { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 16)), - { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 23)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 3)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 10)), - { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 17)), - { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 24)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 28, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 4)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 11)), - { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 18)), - { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 25)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 5)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 12)), - { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 19)), - { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 26)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 6)), - { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 13)), - { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 20)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 27)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 0)), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 7)), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 14)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 21)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 1)), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 8)), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 9 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 15)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 22)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 2)), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 9)), { 0, 0, height }, + { { 0, 0, height + 70 }, { 32, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 16)), + { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 23)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 3)), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 10)), + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 17)), + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 24)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 28, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 4)), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 11)), + { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 18)), + { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 25)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 5)), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 12)), + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 19)), + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 26)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 6)), { 0, 0, height }, + { { 0, 16, height + 32 }, { 32, 16, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 13)), + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 20)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 27)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + } } static void GigaRCTrackRightLargeHalfLoopUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 28)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 35)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 42)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 49)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 29)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 36)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 43)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 50)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 30)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 37)), - { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 44)), - { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 51)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 31)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 8, 28, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 38)), - { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 45)), - { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 52)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 32)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 39)), - { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 46)), - { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 53)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); - break; - case 5: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 33)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 40)), - { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 47)), - { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 54)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); - break; - case 6: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 34)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 41)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 48)), - { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 55)), - { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 28)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 35)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 42)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 49)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 29)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 36)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 43)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 50)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 30)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 37)), + { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 44)), + { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 51)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 88, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 31)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 8, 28, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 38)), + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 45)), + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 52)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 32)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 39)), + { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 46)), + { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 53)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 33)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 40)), + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 47)), + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 54)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 224, 0x20); + break; + case 6: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 34)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 41)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 48)), + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_LARGE_HALF_LOOP + 55)), + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); + break; + } } static void GigaRCTrackRightLargeHalfLoopDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackRightLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); + GigaRCTrackRightLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } static void GigaRCTrackLeftLargeHalfLoopDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackLeftLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); + GigaRCTrackLeftLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } static void GigaRCTrackFlatTo60DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -if (trackElement.HasChain()) -{ - switch (direction) + if (trackElement.HasChain()) { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 0)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 2)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 1)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 4)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 3)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 5)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 0)), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 2)), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 1)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 4)), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 3)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 5)), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } } -} -else -{ - switch (direction) + else { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 0)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 2)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 1)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 4)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 3)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 5)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 0)), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 2)), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 1)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 4)), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 3)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + MetalASupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 5)), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } } -} -if (direction == 0 || direction == 3) -{ - PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); -} -else -{ - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); -} -PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); -PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); } static void GigaRCTrack60DegUpToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -if (trackElement.HasChain()) -{ - switch (direction) + if (trackElement.HasChain()) { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 6)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 7)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 8)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 10)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 9)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 11)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - break; + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 6)), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 7)), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 8)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 10)), + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 9)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 11)), + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); -} -else -{ - switch (direction) + else { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 6)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 7)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 8)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 10)), - { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 9)), - { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 11)), - { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); - break; + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 6)), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 7)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 8)), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 10)), + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 9)), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 11)), + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); -} -if (direction == 0 || direction == 3) -{ - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); -} -else -{ - PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); -} -PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); -PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + else + { + PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_0); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } static void GigaRCTrackFlatTo60DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrack60DegDownToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagFlatTo60DegUp( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; -} + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + else + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } } static void GigaRCTrackDiag60DegUpToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 20, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + else + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 20, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackDiagFlatTo60DegDown( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 16, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 17)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 18)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 16)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + else + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 19)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 16, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackDiag60DegDownToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 1: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 2: - if (trackElement.HasChain()) - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - else - { - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; - case 3: - if (trackElement.HasChain()) - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - else - { - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); - break; -} + switch (trackSequence) + { + case 0: + if (trackElement.HasChain()) + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 13)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 1: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 14)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 2: + if (trackElement.HasChain()) + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + else + { + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 12)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + case 3: + if (trackElement.HasChain()) + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + else + { + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_SMALL_FLAT_TO_STEEP + 15)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); + break; + } } static void GigaRCTrackLeftEighthToDiagUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 0)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 4)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 8)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 12)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 1)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 5)), - { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 9)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 13)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 2)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 6)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 10)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 14)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 3)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 7)), - { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 11)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 15)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 0)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 4)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 8)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 12)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 1)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 5)), + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 9)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 13)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 2)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 6)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 10)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 14)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 3)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 7)), + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 11)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 15)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackRightEighthToDiagUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 16)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 20)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 24)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 28)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 17)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 21)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 25)), - { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 29)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 18)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 22)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 26)), - { 0, 0, height }, { { 4, 4, height }, { 28, 28, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 30)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 19)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 23)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 27)), - { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 31)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 20)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 24)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 28)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 17)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 21)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 25)), + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 29)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 18)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 22)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 26)), + { 0, 0, height }, { { 4, 4, height }, { 28, 28, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 30)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 19)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 23)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 27)), + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 31)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackLeftEighthToOrthogonalUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 32)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 36)), - { 0, 0, height }, { { 16, 16, height }, { 16, 18, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 40)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 44)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 33)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 37)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 41)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 45)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 34)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 38)), - { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 42)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 46)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 35)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 39)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 43)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 47)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - break; - } - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 32)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 36)), + { 0, 0, height }, { { 16, 16, height }, { 16, 18, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 40)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 44)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 33)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 37)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 41)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 45)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 34)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 38)), + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 42)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 46)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 35)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 39)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 43)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 47)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 1 || direction == 2) - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); - } + if (direction == 1 || direction == 2) + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackRightEighthToOrthogonalUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 48)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 52)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 56)), - { 0, 0, height }, { { 16, 0, height }, { 16, 18, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 60)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 49)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 53)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 57)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 61)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 50)), - { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 54)), - { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 58)), - { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 62)), - { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 51)), - { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 55)), - { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 59)), - { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 63)), - { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - break; - } - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - if (direction == 0 || direction == 1) - { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 48)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 52)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 56)), + { 0, 0, height }, { { 16, 0, height }, { 16, 18, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 60)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 49)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 53)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 57)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 61)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 50)), + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 54)), + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 58)), + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 62)), + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 51)), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 55)), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 59)), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE + 63)), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); + break; + } + MetalASupportsPaintSetup(session, MetalSupportType::Tubes, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 1) + { + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackLeftEighthToDiagDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -uint8_t map[5] = { 4, 3, 1, 2, 0 }; -trackSequence = map[trackSequence]; -GigaRCTrackRightEighthToOrthogonalUp25(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + uint8_t map[5] = { 4, 3, 1, 2, 0 }; + trackSequence = map[trackSequence]; + GigaRCTrackRightEighthToOrthogonalUp25(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } static void GigaRCTrackRightEighthToDiagDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -uint8_t map[5] = { 4, 3, 1, 2, 0 }; -trackSequence = map[trackSequence]; -GigaRCTrackLeftEighthToOrthogonalUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + uint8_t map[5] = { 4, 3, 1, 2, 0 }; + trackSequence = map[trackSequence]; + GigaRCTrackLeftEighthToOrthogonalUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackLeftEighthToOrthogonalDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; -GigaRCTrackRightEighthToDiagUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + GigaRCTrackRightEighthToDiagUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackRightEighthToOrthogonalDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; -GigaRCTrackLeftEighthToDiagUp25(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + GigaRCTrackLeftEighthToDiagUp25(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } static void GigaRCTrackDiagUp25ToLeftBankedUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 4)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 0)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 1)), - { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 3)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 2)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 10, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 10, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 4)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 0)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 1)), + { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 3)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 2)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 10, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 10, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackDiagUp25ToRightBankedUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 9)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 5)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 7)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 8)), - { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 6)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 10, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 9)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 5)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 7)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 8)), + { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 6)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 10, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackDiagLeftBankedUp25ToUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 14)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 10)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 11)), - { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 13)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 12)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 14)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 10)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 11)), + { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 13)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 12)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagRightBankedUp25ToUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 19)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 15)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 17)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 18)), - { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 16)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 19)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 15)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 17)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 18)), + { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 16)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 5, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagDown25ToLeftBankedDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagRightBankedUp25ToUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagRightBankedUp25ToUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagDown25ToRightBankedDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagLeftBankedUp25ToUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagLeftBankedUp25ToUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagLeftBankedDown25ToDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagUp25ToRightBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagUp25ToRightBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagRightBankedDown25ToDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagUp25ToLeftBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagUp25ToLeftBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 23)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 20)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 22)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 21)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 23)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 20)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 22)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 21)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackDiagRightBankedFlatToRightBankedUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 27)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 24)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 26)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 25)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 27)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 24)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 26)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 25)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 31)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 28)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 30)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 29)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 31)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 28)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 30)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 29)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagRightBankedUp25ToRightBankedFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 35)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 32)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 34)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 33)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 35)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 32)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 34)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 33)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagLeftBankedFlatToLeftBankedDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagRightBankedUp25ToRightBankedFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagRightBankedUp25ToRightBankedFlat( + session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagRightBankedFlatToRightBankedDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagLeftBankedUp25ToLeftBankedFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagLeftBankedDown25ToLeftBankedFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagRightBankedFlatToRightBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagRightBankedFlatToRightBankedUp25( + session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagRightBankedDown25ToRightBankedFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagLeftBankedFlatToLeftBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagUp25LeftBanked( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 39)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 36)), - { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 38)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 37)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 39)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 36)), + { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 38)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 37)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagUp25RightBanked( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 43)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 40)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 42)), - { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 41)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 11, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 43)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 40)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 42)), + { -16, -16, height }, { { -16, -16, height + 48 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 41)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 11, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagDown25LeftBanked( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagUp25RightBanked(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagUp25RightBanked(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagDown25RightBanked( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagUp25LeftBanked(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagUp25LeftBanked(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagFlatToLeftBankedUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 48)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 44)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 45)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 47)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 46)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 48)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 44)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 45)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 47)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 46)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackDiagFlatToRightBankedUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 53)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 49)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 51)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 52)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 50)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 53)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 49)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 51)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 52)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 50)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); + break; + } } static void GigaRCTrackDiagLeftBankedUp25ToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 58)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 54)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 55)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 57)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 56)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 58)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 54)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 55)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 57)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 56)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagRightBankedUp25ToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 63)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 59)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 2: - switch (direction) - { - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 61)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 62)), - { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; - case 3: - switch (direction) - { - case 0: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 60)), - { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 63)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 59)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 2: + switch (direction) + { + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 61)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 62)), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + case 3: + switch (direction) + { + case 0: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 60)), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 4, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); + break; + } } static void GigaRCTrackDiagFlatToLeftBankedDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagRightBankedUp25ToFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagRightBankedUp25ToFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagFlatToRightBankedDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagLeftBankedUp25ToFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagLeftBankedUp25ToFlat(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagLeftBankedDown25ToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagFlatToRightBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagFlatToRightBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackDiagRightBankedDown25ToFlat( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -GigaRCTrackDiagFlatToLeftBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackDiagFlatToLeftBankedUp25(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackLeftEighthBankToDiagUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 64)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 68)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 72)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 76)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 65)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 69)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 73)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 77)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 66)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 70)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 40, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 74)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 78)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 67)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 71)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 75)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 79)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 64)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 68)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 72)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 76)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 65)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 69)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 73)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 77)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 66)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 70)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 40, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 74)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 78)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 67)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 71)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 75)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 79)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackRightEighthBankToDiagUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 80)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 84)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 88)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 92)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 3) - { - PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 81)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 85)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 89)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 93)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 82)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 86)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 90)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 40, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 94)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 83)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 87)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 91)), - { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 95)), - { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 80)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 84)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 88)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 92)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height - 8, TUNNEL_1); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 81)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 85)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 89)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 93)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 82)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 86)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 90)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 40, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 94)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 83)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 87)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 91)), + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 95)), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 7, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackLeftEighthBankToOrthogonalUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 96)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 100)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 104)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 108)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 97)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 101)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 105)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 109)), - { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 98)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 102)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 106)), - { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 110)), - { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 99)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 103)), - { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 107)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 111)), - { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 1 || direction == 2) - { - PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 96)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 100)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 104)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 108)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 97)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 101)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 105)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 109)), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 98)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 102)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 106)), + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 110)), + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 99)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 103)), + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 107)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 111)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 1 || direction == 2) + { + PaintUtilPushTunnelRotated(session, direction, height + 8, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackRightEighthBankToOrthogonalUp25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + 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[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 112)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 2, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 116)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 120)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 124)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - MetalBSupportsPaintSetup( - session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 1: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 113)), - { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 117)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 121)), - { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 125)), - { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 2: - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 3: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 114)), - { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 118)), - { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 122)), - { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 126)), - { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); - break; - } - PaintUtilSetSegmentSupportHeight( - session, - PaintUtilRotateSegments( - SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), - 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; - case 4: - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 115)), - { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 119)), - { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 123)), - { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, - session.TrackColours[SCHEME_TRACK].WithIndex( - (SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 127)), - { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); - MetalBSupportsPaintSetup(session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); - break; - } - if (direction == 0 || direction == 1) - { - PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); - } - PaintUtilSetSegmentSupportHeight( - session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); - break; -} + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 112)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 2, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 116)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 3, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 120)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 124)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 113)), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 117)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 121)), + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 32, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 125)), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 2: + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 3: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 114)), + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 118)), + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 122)), + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 126)), + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + case 4: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 115)), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 119)), + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 123)), + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 32 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, + session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_GIGA_TRACK_GENTLE_LARGE_CURVE_BANKED + 127)), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); + MetalBSupportsPaintSetup( + session, MetalSupportType::Tubes, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 1) + { + PaintUtilPushTunnelRotated(session, direction + 1, height + 8, TUNNEL_2); + } + PaintUtilSetSegmentSupportHeight( + session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); + break; + } } static void GigaRCTrackLeftEighthBankToDiagDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -uint8_t map[5] = { 4, 3, 1, 2, 0 }; -trackSequence = map[trackSequence]; -GigaRCTrackRightEighthBankToOrthogonalUp25(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + uint8_t map[5] = { 4, 3, 1, 2, 0 }; + trackSequence = map[trackSequence]; + GigaRCTrackRightEighthBankToOrthogonalUp25(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } static void GigaRCTrackRightEighthBankToDiagDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -uint8_t map[5] = { 4, 3, 1, 2, 0 }; -trackSequence = map[trackSequence]; -GigaRCTrackLeftEighthBankToOrthogonalUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + uint8_t map[5] = { 4, 3, 1, 2, 0 }; + trackSequence = map[trackSequence]; + GigaRCTrackLeftEighthBankToOrthogonalUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackLeftEighthBankToOrthogonalDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; -GigaRCTrackRightEighthBankToDiagUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + GigaRCTrackRightEighthBankToDiagUp25(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } static void GigaRCTrackRightEighthBankToOrthogonalDown25( -PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, -const TrackElement& trackElement) + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) { -trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; -GigaRCTrackLeftEighthBankToDiagUp25(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; + GigaRCTrackLeftEighthBankToDiagUp25(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } - - TRACK_PAINT_FUNCTION GetTrackPaintFunctionGigaRC(int32_t trackType) { switch (trackType)