mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Sort rides into ride groups when in select-by-track-type mode
* Add ride groups * Convert ride groups to C++ * Fix linking and crashes in Xcode * Comment out .field syntax to make Visual Studio happy * Fix alignment, fix changelog, cleanup * Properly save ride group index in the ride object repository and bump its version * Fix fallback behaviour when the ride entry is not available or not invented * Fix include * Rename RideGroup to RideGroupManager, add const, cleanup * Break after finding matching ride group
This commit is contained in:
committed by
GitHub
parent
fda2f38097
commit
96a7a8ab50
@@ -55,7 +55,7 @@ extern "C"
|
||||
|
||||
using namespace OpenRCT2;
|
||||
|
||||
constexpr uint16 OBJECT_REPOSITORY_VERSION = 10;
|
||||
constexpr uint16 OBJECT_REPOSITORY_VERSION = 11;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct ObjectRepositoryHeader
|
||||
@@ -467,10 +467,11 @@ private:
|
||||
{
|
||||
item.RideCategory[i] = stream->ReadValue<uint8>();
|
||||
}
|
||||
for (sint32 i = 0; i < 3; i++)
|
||||
for (sint32 i = 0; i < MAX_RIDE_TYPES_PER_RIDE_ENTRY; i++)
|
||||
{
|
||||
item.RideType[i] = stream->ReadValue<uint8>();
|
||||
}
|
||||
item.RideGroupIndex = stream->ReadValue<uint8>();
|
||||
break;
|
||||
case OBJECT_TYPE_SCENERY_SETS:
|
||||
item.NumThemeObjects = stream->ReadValue<uint16>();
|
||||
@@ -501,6 +502,7 @@ private:
|
||||
{
|
||||
stream->WriteValue<uint8>(item.RideType[i]);
|
||||
}
|
||||
stream->WriteValue<uint8>(item.RideGroupIndex);
|
||||
break;
|
||||
case OBJECT_TYPE_SCENERY_SETS:
|
||||
stream->WriteValue<uint16>(item.NumThemeObjects);
|
||||
|
||||
Reference in New Issue
Block a user