diff --git a/src/openrct2/ride/TrackData.cpp b/src/openrct2/ride/TrackData.cpp index fbaefec665..96951fa327 100644 --- a/src/openrct2/ride/TrackData.cpp +++ b/src/openrct2/ride/TrackData.cpp @@ -531,7 +531,7 @@ const rct_track_coordinates TrackCoordinates[TrackElemType::Count] = { }; /** rct2: 0x0099BA64 */ -const uint8_t TrackSequenceProperties[][16] = { +const uint8_t TrackSequenceProperties[][MaxSequencesPerPiece] = { { 0 }, /* TrackElemType::EndStation */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN | TRACK_SEQUENCE_FLAG_DISALLOW_DOORS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* TrackElemType::BeginStation */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN | TRACK_SEQUENCE_FLAG_DISALLOW_DOORS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -791,7 +791,7 @@ const uint8_t TrackSequenceProperties[][16] = { }; /** rct2: 0x0099CA64 */ -const uint8_t FlatRideTrackSequenceProperties[][16] = { +const uint8_t FlatRideTrackSequenceProperties[][MaxSequencesPerPiece] = { { 0 }, /* 1 */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 2 */ { TRACK_SEQUENCE_FLAG_DIRECTION_1 | TRACK_SEQUENCE_FLAG_DIRECTION_3 | TRACK_SEQUENCE_FLAG_ORIGIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, @@ -6035,7 +6035,7 @@ const uint32_t TrackHeightMarkerPositions[TrackElemType::Count] = { }; /** rct2: 0x00999A94 */ -const uint8_t TrackSequenceElementAllowedWallEdges[][16] = { +const uint8_t TrackSequenceElementAllowedWallEdges[][MaxSequencesPerPiece] = { { 0b1010, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // TrackElemType::Flat { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // TrackElemType::EndStation { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // TrackElemType::BeginStation @@ -6295,7 +6295,7 @@ const uint8_t TrackSequenceElementAllowedWallEdges[][16] = { }; /** rct2: 0x0099AA94 */ -const uint8_t FlatRideTrackSequenceElementAllowedWallEdges[][16] = { +const uint8_t FlatRideTrackSequenceElementAllowedWallEdges[][MaxSequencesPerPiece] = { { 0b1010, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, diff --git a/src/openrct2/ride/TrackData.h b/src/openrct2/ride/TrackData.h index f9611f691d..e9f2998f15 100644 --- a/src/openrct2/ride/TrackData.h +++ b/src/openrct2/ride/TrackData.h @@ -13,13 +13,15 @@ #include "Track.h" #include "TrackPaint.h" +constexpr const uint8_t MaxSequencesPerPiece = 16; + // 0x009968BB, 0x009968BC, 0x009968BD, 0x009968BF, 0x009968C1, 0x009968C3 extern const rct_track_coordinates TrackCoordinates[TrackElemType::Count]; // 0x009972BB, 0x009972BC, 0x009972BD, 0x009972BF, 0x009972C1, 0x009972C3 extern const rct_track_coordinates FlatTrackCoordinates[TrackElemType::Count]; -extern const uint8_t TrackSequenceProperties[TrackElemType::Count][16]; -extern const uint8_t FlatRideTrackSequenceProperties[TrackElemType::Count][16]; +extern const uint8_t TrackSequenceProperties[TrackElemType::Count][MaxSequencesPerPiece]; +extern const uint8_t FlatRideTrackSequenceProperties[TrackElemType::Count][MaxSequencesPerPiece]; extern const rct_preview_track* TrackBlocks[TrackElemType::Count]; extern const rct_preview_track* FlatRideTrackBlocks[TrackElemType::Count];