From d6a481b06695eabd5e61b4f2cb496ec7782459ae Mon Sep 17 00:00:00 2001 From: Maciek <1977132+Xata@users.noreply.github.com> Date: Sun, 12 Nov 2023 04:04:25 -0700 Subject: [PATCH] Close #20881: Replace monorail_diag_blocked_segments with DiagBlockedSegments (#20961) Removed monorail_diag_blocked_segments. Replaced the references with DiagBlockedSegments. --- src/openrct2/ride/transport/Monorail.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index f79b78bbdc..815bea1bd9 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -1129,13 +1129,6 @@ static constexpr bool monorail_diag_image_segment[][4] = { { true, false, false, false }, }; -static constexpr int32_t monorail_diag_blocked_segments[] = { - SEGMENT_C4 | SEGMENT_CC | SEGMENT_D4 | SEGMENT_BC, - SEGMENT_C4 | SEGMENT_CC | SEGMENT_C8 | SEGMENT_B4, - SEGMENT_D0 | SEGMENT_C4 | SEGMENT_C0 | SEGMENT_D4, - SEGMENT_D0 | SEGMENT_C4 | SEGMENT_B8 | SEGMENT_C8, -}; - /** rct2: 0x008AE2AC */ static void PaintMonorailTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, @@ -1154,7 +1147,7 @@ static void PaintMonorailTrackDiagFlat( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } @@ -1177,7 +1170,7 @@ static void PaintMonorailTrackDiag25DegUp( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } @@ -1200,7 +1193,7 @@ static void PaintMonorailTrackDiagFlatTo25DegUp( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } @@ -1223,7 +1216,7 @@ static void PaintMonorailTrackDiag25DegUpToFlat( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } @@ -1246,7 +1239,7 @@ static void PaintMonorailTrackDiag25DegDown( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } @@ -1270,7 +1263,7 @@ static void PaintMonorailTrackDiagFlatTo25DegDown( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } @@ -1294,7 +1287,7 @@ static void PaintMonorailTrackDiag25DegDownToFlat( session.TrackColours[SCHEME_SUPPORTS]); } - int32_t blockedSegments = monorail_diag_blocked_segments[trackSequence]; + int32_t blockedSegments = DiagBlockedSegments[trackSequence]; PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); }