1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Allow loading objects from RCTC

These are technically same as those from RCT2, but with a .POB extension, rather than .DAT
This commit is contained in:
Gymnasiast
2017-09-28 21:42:58 +02:00
parent ffaa3403d0
commit 6c9e73bff2

View File

@@ -80,7 +80,7 @@ class ObjectFileIndex final : public FileIndex<ObjectRepositoryItem>
private:
static constexpr uint32 MAGIC_NUMBER = 0x5844494F; // OIDX
static constexpr uint16 VERSION = 15;
static constexpr auto PATTERN = "*.dat";
static constexpr auto PATTERN = "*.dat;*.pob";
public:
ObjectFileIndex(IPlatformEnvironment * env) :
@@ -125,7 +125,7 @@ protected:
switch (item.ObjectEntry.flags & 0x0F) {
case OBJECT_TYPE_RIDE:
stream->WriteValue<uint8>(item.RideFlags);
for (sint32 i = 0; i < 2; i++)
for (sint32 i = 0; i < MAX_CATEGORIES_PER_RIDE; i++)
{
stream->WriteValue<uint8>(item.RideCategory[i]);
}