1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Merge pull request #21681 from AaronVanGeffen/obj-list-refactor

Move various object list properties out of ObjectTypes header
This commit is contained in:
Michael Steenbeek
2024-04-12 11:54:13 +02:00
committed by GitHub
19 changed files with 129 additions and 103 deletions

View File

@@ -1312,10 +1312,10 @@ static_assert(_objectTypeNames.size() == EnumValue(ObjectType::Count));
static int32_t ConsoleCommandCountObjects(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv)
{
for (auto objectType : ObjectTypes)
for (auto objectType : getAllObjectTypes())
{
int32_t entryGroupIndex = 0;
for (; entryGroupIndex < object_entry_group_counts[EnumValue(objectType)]; entryGroupIndex++)
uint32_t entryGroupIndex = 0;
for (; entryGroupIndex < getObjectEntryGroupCount(objectType); entryGroupIndex++)
{
if (ObjectEntryGetObject(objectType, entryGroupIndex) == nullptr)
{
@@ -1323,8 +1323,7 @@ static int32_t ConsoleCommandCountObjects(InteractiveConsole& console, [[maybe_u
}
}
console.WriteFormatLine(
"%s: %d/%d", _objectTypeNames[EnumValue(objectType)], entryGroupIndex,
object_entry_group_counts[EnumValue(objectType)]);
"%s: %d/%d", _objectTypeNames[EnumValue(objectType)], entryGroupIndex, getObjectEntryGroupCount(objectType));
}
return 0;