From 97e9634a616b53546d8d73fd82e097aefa3c851f Mon Sep 17 00:00:00 2001 From: Harry-Hopkinson Date: Sun, 28 Apr 2024 14:08:02 +0000 Subject: [PATCH] Rename edges_2x2 to kEdges2x2 --- 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 9a3c433718..114565ecfd 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 edges_2x2[] = { - EDGE_NE | EDGE_NW, - EDGE_NE | EDGE_SE, - EDGE_SW | EDGE_NW, - EDGE_SW | EDGE_SE, -}; - const uint8_t track_map_3x3[][9] = { { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, { 0, 3, 5, 7, 2, 8, 1, 6, 4 }, diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 2b5e9b296a..d185126c5b 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -23,7 +23,12 @@ constexpr uint8_t kTrackMap2x2[][4] = { { 3, 2, 1, 0 }, { 2, 0, 3, 1 }, }; -extern const uint8_t edges_2x2[]; +constexpr uint8_t kEdges2x2[] = { + EDGE_NE | EDGE_NW, + EDGE_NE | EDGE_SE, + EDGE_SW | EDGE_NW, + EDGE_SW | EDGE_SE, +}; extern const uint8_t track_map_3x3[][9]; extern const uint8_t edges_3x3[]; diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 44d5f1fa4b..602b5339d0 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -202,7 +202,7 @@ static void PaintSpiralSlide( trackSequence = kTrackMap2x2[direction][trackSequence]; - int32_t edges = edges_2x2[trackSequence]; + int32_t edges = kEdges2x2[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index e81a64b373..3232d8a462 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -106,7 +106,7 @@ static void PaintMotionSimulator( { trackSequence = kTrackMap2x2[direction][trackSequence]; - int32_t edges = edges_2x2[trackSequence]; + int32_t edges = kEdges2x2[trackSequence]; auto stationColour = GetStationColourScheme(session, trackElement); WoodenASupportsPaintSetupRotated(