mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Remove ObjectType++ operator, ensure ObjectTypes size
This commit is contained in:
@@ -1273,18 +1273,19 @@ static int32_t cc_object_count(InteractiveConsole& console, [[maybe_unused]] con
|
||||
"Paths", "Path Additions", "Scenery groups", "Park entrances", "Water",
|
||||
};
|
||||
|
||||
for (ObjectType i = ObjectType::Ride; i < ObjectType::ScenarioText; i++)
|
||||
for (auto objectType : ObjectTypes)
|
||||
{
|
||||
int32_t entryGroupIndex = 0;
|
||||
for (; entryGroupIndex < object_entry_group_counts[EnumValue(i)]; entryGroupIndex++)
|
||||
for (; entryGroupIndex < object_entry_group_counts[EnumValue(objectType)]; entryGroupIndex++)
|
||||
{
|
||||
if (object_entry_get_chunk(i, entryGroupIndex) == nullptr)
|
||||
if (object_entry_get_chunk(objectType, entryGroupIndex) == nullptr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
console.WriteFormatLine(
|
||||
"%s: %d/%d", object_type_names[EnumValue(i)], entryGroupIndex, object_entry_group_counts[EnumValue(i)]);
|
||||
"%s: %d/%d", object_type_names[EnumValue(objectType)], entryGroupIndex,
|
||||
object_entry_group_counts[EnumValue(objectType)]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user