1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Introduce constant for max sequences (#13405)

This commit is contained in:
Michael Steenbeek
2020-11-11 01:24:02 +01:00
committed by GitHub
parent cf7ce2d921
commit 1ab3f4b250
2 changed files with 8 additions and 6 deletions

View File

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

View File

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