forked from rosebudai/OpenRCT2-Web
Move kObjectEntryGroupCounts to ObjectList.cpp
This commit is contained in:
1 parent
d645906003
commit
e898e9211d
15 files changed
+48
-33
No files matched your search
@@ -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