From b9003d6e60a2a9cda6c8713b9298fc7b711bc4b2 Mon Sep 17 00:00:00 2001 From: Harry-Hopkinson Date: Sun, 28 Apr 2024 14:26:12 +0000 Subject: [PATCH] Rename track_map_4x4 to kTrackMap4x4 --- src/openrct2/ride/TrackPaint.cpp | 7 ------- src/openrct2/ride/TrackPaint.h | 7 ++++++- src/openrct2/ride/gentle/Dodgems.cpp | 2 +- src/openrct2/ride/gentle/FlyingSaucers.cpp | 2 +- src/openrct2/ride/thrill/Enterprise.cpp | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 0859673b75..9500ed3a85 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_4x4[][16] = { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12 }, - { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3 }, -}; - // clang-format off const uint8_t edges_4x4[] = { EDGE_NE | EDGE_NW, diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 8d19584f17..4da9167722 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -50,7 +50,12 @@ constexpr uint8_t kEdges3x3[] = { }; // clang-format on -extern const uint8_t track_map_4x4[][16]; +constexpr uint8_t kTrackMap4x4[][16] = { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12 }, + { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3 }, +}; extern const uint8_t edges_4x4[]; extern const uint8_t track_map_1x4[][4]; diff --git a/src/openrct2/ride/gentle/Dodgems.cpp b/src/openrct2/ride/gentle/Dodgems.cpp index c88892523a..c4d20444b7 100644 --- a/src/openrct2/ride/gentle/Dodgems.cpp +++ b/src/openrct2/ride/gentle/Dodgems.cpp @@ -47,7 +47,7 @@ static void PaintDodgems( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - uint8_t relativeTrackSequence = track_map_4x4[direction][trackSequence]; + uint8_t relativeTrackSequence = kTrackMap4x4[direction][trackSequence]; int32_t edges = edges_4x4[relativeTrackSequence]; diff --git a/src/openrct2/ride/gentle/FlyingSaucers.cpp b/src/openrct2/ride/gentle/FlyingSaucers.cpp index f2ab1973b6..b0eafeb72c 100644 --- a/src/openrct2/ride/gentle/FlyingSaucers.cpp +++ b/src/openrct2/ride/gentle/FlyingSaucers.cpp @@ -38,7 +38,7 @@ static void PaintFlyingSaucers( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - uint8_t relativeTrackSequence = track_map_4x4[direction][trackSequence]; + uint8_t relativeTrackSequence = kTrackMap4x4[direction][trackSequence]; int32_t edges = edges_4x4[relativeTrackSequence]; diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index a2dc273011..82396a5d47 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -91,7 +91,7 @@ static void PaintEnterprise( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - trackSequence = track_map_4x4[direction][trackSequence]; + trackSequence = kTrackMap4x4[direction][trackSequence]; int32_t edges = edges_4x4[trackSequence];