mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 03:53:07 +01:00
refactor: ObjectType to use strong enum
enum renaming complete
This commit is contained in:
@@ -148,7 +148,7 @@ protected:
|
||||
|
||||
switch (item.ObjectEntry.GetType())
|
||||
{
|
||||
case OBJECT_TYPE_RIDE:
|
||||
case ObjectType::Ride:
|
||||
stream->WriteValue<uint8_t>(item.RideInfo.RideFlags);
|
||||
for (int32_t i = 0; i < MAX_CATEGORIES_PER_RIDE; i++)
|
||||
{
|
||||
@@ -159,7 +159,7 @@ protected:
|
||||
stream->WriteValue<uint8_t>(item.RideInfo.RideType[i]);
|
||||
}
|
||||
break;
|
||||
case OBJECT_TYPE_SCENERY_GROUP:
|
||||
case ObjectType::SceneryGroup:
|
||||
stream->WriteValue<uint16_t>(static_cast<uint16_t>(item.SceneryGroupInfo.Entries.size()));
|
||||
for (const auto& entry : item.SceneryGroupInfo.Entries)
|
||||
{
|
||||
@@ -194,7 +194,7 @@ protected:
|
||||
|
||||
switch (item.ObjectEntry.GetType())
|
||||
{
|
||||
case OBJECT_TYPE_RIDE:
|
||||
case ObjectType::Ride:
|
||||
item.RideInfo.RideFlags = stream->ReadValue<uint8_t>();
|
||||
for (int32_t i = 0; i < MAX_CATEGORIES_PER_RIDE; i++)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ protected:
|
||||
item.RideInfo.RideType[i] = stream->ReadValue<uint8_t>();
|
||||
}
|
||||
break;
|
||||
case OBJECT_TYPE_SCENERY_GROUP:
|
||||
case ObjectType::SceneryGroup:
|
||||
{
|
||||
auto numEntries = stream->ReadValue<uint16_t>();
|
||||
item.SceneryGroupInfo.Entries = std::vector<rct_object_entry>(numEntries);
|
||||
@@ -689,7 +689,7 @@ bool IsObjectCustom(const ObjectRepositoryItem* object)
|
||||
// Do not count our new object types as custom yet, otherwise the game
|
||||
// will try to pack them into saved games.
|
||||
auto type = object->ObjectEntry.GetType();
|
||||
if (type > OBJECT_TYPE_SCENARIO_TEXT)
|
||||
if (type > ObjectType::ScenarioText)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user