diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 990a6887aa..0859673b75 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -50,20 +50,6 @@ static constexpr TileCoordsXY EntranceOffsetEdgeNW[] = { { -1, 0 }, }; -// clang-format off -const uint8_t edges_3x3[] = { - 0, - EDGE_NE | EDGE_NW, - EDGE_NE, - EDGE_NE | EDGE_SE, - EDGE_NW, - EDGE_SE, - EDGE_SW | EDGE_NW, - EDGE_SW | EDGE_SE, - EDGE_SW, -}; -// clang-format on - 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 }, diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index f662049e57..8d19584f17 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -36,7 +36,19 @@ constexpr uint8_t kTrackMap3x3[][9] = { { 0, 7, 8, 6, 5, 4, 3, 1, 2 }, { 0, 6, 4, 1, 8, 2, 7, 3, 5 }, }; -extern const uint8_t edges_3x3[]; +// clang-format off +constexpr uint8_t kEdges3x3[] = { + 0, + EDGE_NE | EDGE_NW, + EDGE_NE, + EDGE_NE | EDGE_SE, + EDGE_NW, + EDGE_SE, + EDGE_SW | EDGE_NW, + EDGE_SW | EDGE_SE, + EDGE_SW, +}; +// clang-format on extern const uint8_t track_map_4x4[][16]; extern const uint8_t edges_4x4[]; diff --git a/src/openrct2/ride/gentle/Circus.cpp b/src/openrct2/ride/gentle/Circus.cpp index ccabd34580..307e15bdea 100644 --- a/src/openrct2/ride/gentle/Circus.cpp +++ b/src/openrct2/ride/gentle/Circus.cpp @@ -52,7 +52,7 @@ static void PaintCircus( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index 34edd72cd2..bf8d92b5cf 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -86,7 +86,7 @@ static void PaintCrookedHouse( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 0df068c0f4..79d0688101 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -66,7 +66,7 @@ static void PaintHauntedHouse( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index ce72e55b9e..20f0df4c29 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -107,7 +107,7 @@ static void PaintMerryGoRound( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index 965879c1de..f2baa05422 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -85,7 +85,7 @@ static void PaintObservationTowerBase( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; CoordsXY position = session.MapPosition; WoodenASupportsPaintSetupRotated( diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index 6ff0258ec0..c40b044613 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -89,7 +89,7 @@ static void PaintSpaceRings( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; CoordsXY position = session.MapPosition; ImageId imageId; diff --git a/src/openrct2/ride/thrill/3dCinema.cpp b/src/openrct2/ride/thrill/3dCinema.cpp index 7a5f2f67ae..00308f6f1a 100644 --- a/src/openrct2/ride/thrill/3dCinema.cpp +++ b/src/openrct2/ride/thrill/3dCinema.cpp @@ -54,7 +54,7 @@ static void Paint3dCinema( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; auto stationColour = GetStationColourScheme(session, trackElement); WoodenASupportsPaintSetupRotated( diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index e2d01dd130..21609df0b5 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -93,7 +93,7 @@ static void PaintLaunchedFreefallBase( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index 53cb14f754..94ba0e030c 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -105,7 +105,7 @@ static void PaintRotoDropBase( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, diff --git a/src/openrct2/ride/thrill/TopSpin.cpp b/src/openrct2/ride/thrill/TopSpin.cpp index 48ebe2012c..4f5210d749 100644 --- a/src/openrct2/ride/thrill/TopSpin.cpp +++ b/src/openrct2/ride/thrill/TopSpin.cpp @@ -184,7 +184,7 @@ static void PaintTopSpin( { trackSequence = kTrackMap3x3[direction][trackSequence]; - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; auto stationColour = GetStationColourScheme(session, trackElement); WoodenASupportsPaintSetupRotated( diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index 4c2e051cc9..b8d00d1882 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -87,7 +87,7 @@ static void PaintTwist( { trackSequence = kTrackMap3x3[direction][trackSequence]; - const uint8_t edges = edges_3x3[trackSequence]; + const uint8_t edges = kEdges3x3[trackSequence]; ImageId imageId; diff --git a/src/openrct2/ride/transport/Lift.cpp b/src/openrct2/ride/transport/Lift.cpp index 559e02f2c5..758a9a7981 100644 --- a/src/openrct2/ride/transport/Lift.cpp +++ b/src/openrct2/ride/transport/Lift.cpp @@ -68,7 +68,7 @@ static void PaintLiftBase( return; } - int32_t edges = edges_3x3[trackSequence]; + int32_t edges = kEdges3x3[trackSequence]; auto imageId = session.SupportColours.WithIndex(SPR_FLOOR_METAL_B); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } });