1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Create define for max ride types per ride entry, closes #5524

This commit is contained in:
Michael Steenbeek
2017-06-01 22:00:11 +02:00
committed by GitHub
parent 6dd3650426
commit 7d9acca1e0
9 changed files with 61 additions and 48 deletions

View File

@@ -42,7 +42,7 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
{
stream->Seek(8, STREAM_SEEK_CURRENT);
_legacyType.flags = stream->ReadValue<uint32>();
for (sint32 i = 0; i < 3; i++)
for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++)
{
_legacyType.ride_type[i] = stream->ReadValue<uint8>();
}
@@ -395,7 +395,7 @@ const utf8 * RideObject::GetCapacity() const
void RideObject::SetRepositoryItem(ObjectRepositoryItem * item) const
{
for (sint32 i = 0; i < 3; i++)
for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++)
{
item->RideType[i] = _legacyType.ride_type[i];
}