Rename edges_3x3 to kEdges3x3

This commit is contained in:
Harry-Hopkinson 2024-04-28 14:19:19 +00:00
parent a3e685bf1f
commit 8eebcc5486
14 changed files with 25 additions and 27 deletions

View File

@ -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 },

View File

@ -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[];

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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(

View File

@ -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;

View File

@ -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(

View File

@ -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,

View File

@ -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,

View File

@ -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(

View File

@ -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;

View File

@ -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 } });