mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Move kObjectEntryGroupCounts to ObjectList.cpp
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
std::optional<StringId> _gSceneryGroupPartialSelectError;
|
||||
std::vector<uint8_t> _objectSelectionFlags;
|
||||
int32_t _numSelectedObjectsForType[EnumValue(ObjectType::Count)];
|
||||
uint32_t _numSelectedObjectsForType[EnumValue(ObjectType::Count)];
|
||||
static int32_t _numAvailableObjectsForType[EnumValue(ObjectType::Count)];
|
||||
|
||||
static void SetupInUseSelectionFlags();
|
||||
@@ -127,7 +127,7 @@ void SetupInUseSelectionFlags()
|
||||
|
||||
for (auto objectType : getTransientObjectTypes())
|
||||
{
|
||||
for (int32_t i = 0; i < object_entry_group_counts[EnumValue(objectType)]; i++)
|
||||
for (auto i = 0u; i < getObjectEntryGroupCount(objectType); i++)
|
||||
{
|
||||
Editor::ClearSelectedObject(static_cast<ObjectType>(objectType), i, ObjectSelectionFlags::AllFlags);
|
||||
|
||||
@@ -580,7 +580,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject(
|
||||
}
|
||||
|
||||
ObjectType objectType = item->Type;
|
||||
uint16_t maxObjects = object_entry_group_counts[EnumValue(objectType)];
|
||||
auto maxObjects = getObjectEntryGroupCount(objectType);
|
||||
|
||||
if (maxObjects <= _numSelectedObjectsForType[EnumValue(objectType)])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user