From b795d4ba8aa70bd60e319533ba9622b25779b847 Mon Sep 17 00:00:00 2001 From: Harry-Hopkinson Date: Sun, 28 Apr 2024 14:04:26 +0000 Subject: [PATCH] Rename track_map_2x2 to kTrackMap2x2 --- src/openrct2/ride/TrackPaint.cpp | 7 ------- src/openrct2/ride/TrackPaint.h | 7 ++++++- src/openrct2/ride/gentle/SpiralSlide.cpp | 2 +- src/openrct2/ride/thrill/MotionSimulator.cpp | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 2fa8769c4f..9a3c433718 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -50,13 +50,6 @@ static constexpr TileCoordsXY EntranceOffsetEdgeNW[] = { { -1, 0 }, }; -const uint8_t track_map_2x2[][4] = { - { 0, 1, 2, 3 }, - { 1, 3, 0, 2 }, - { 3, 2, 1, 0 }, - { 2, 0, 3, 1 }, -}; - const uint8_t edges_2x2[] = { EDGE_NE | EDGE_NW, EDGE_NE | EDGE_SE, diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 529e427f56..2b5e9b296a 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -17,7 +17,12 @@ class StationObject; -extern const uint8_t track_map_2x2[][4]; +constexpr uint8_t kTrackMap2x2[][4] = { + { 0, 1, 2, 3 }, + { 1, 3, 0, 2 }, + { 3, 2, 1, 0 }, + { 2, 0, 3, 1 }, +}; extern const uint8_t edges_2x2[]; extern const uint8_t track_map_3x3[][9]; diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 67333cb2d0..44d5f1fa4b 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -200,7 +200,7 @@ static void PaintSpiralSlide( if (rideEntry == nullptr) return; - trackSequence = track_map_2x2[direction][trackSequence]; + trackSequence = kTrackMap2x2[direction][trackSequence]; int32_t edges = edges_2x2[trackSequence]; diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index b1a8e0bd53..e81a64b373 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -104,7 +104,7 @@ static void PaintMotionSimulator( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = track_map_2x2[direction][trackSequence]; + trackSequence = kTrackMap2x2[direction][trackSequence]; int32_t edges = edges_2x2[trackSequence];