1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Rename ObjectType enum to follow recent code style (#23810)

This commit is contained in:
Aaron van Geffen
2025-02-13 23:07:55 +01:00
committed by GitHub
parent b9b2c96c97
commit bb94ee8bc0
75 changed files with 446 additions and 446 deletions

View File

@@ -22,7 +22,7 @@
#include <cstring>
// 0x0098DA00
static constexpr std::array<int32_t, EnumValue(ObjectType::Count)> kObjectEntryGroupCounts = {
static constexpr std::array<int32_t, EnumValue(ObjectType::count)> kObjectEntryGroupCounts = {
kMaxRideObjects, // rides
kMaxSmallSceneryObjects, // small scenery
kMaxLargeSceneryObjects, // large scenery
@@ -38,7 +38,7 @@ static constexpr std::array<int32_t, EnumValue(ObjectType::Count)> kObjectEntryG
kMaxMusicObjects, kMaxFootpathSurfaceObjects, kMaxFootpathRailingsObjects,
kMaxAudioObjects, kMaxPeepNamesObjects, kMaxPeepAnimationsObjects,
};
static_assert(std::size(kObjectEntryGroupCounts) == EnumValue(ObjectType::Count));
static_assert(std::size(kObjectEntryGroupCounts) == EnumValue(ObjectType::count));
size_t getObjectEntryGroupCount(ObjectType objectType)
{
@@ -48,7 +48,7 @@ size_t getObjectEntryGroupCount(ObjectType objectType)
size_t getObjectTypeLimit(ObjectType type)
{
auto index = EnumValue(type);
if (index >= EnumValue(ObjectType::Count))
if (index >= EnumValue(ObjectType::count))
return 0;
return static_cast<size_t>(kObjectEntryGroupCounts[index]);
}
@@ -209,7 +209,7 @@ void ObjectCreateIdentifierName(char* string_buffer, size_t size, const RCTObjec
void ObjectGetTypeEntryIndex(size_t index, ObjectType* outObjectType, ObjectEntryIndex* outEntryIndex)
{
uint8_t objectType = EnumValue(ObjectType::Ride);
uint8_t objectType = EnumValue(ObjectType::ride);
for (size_t groupCount : kObjectEntryGroupCounts)
{
if (index >= groupCount)