//
// LevelEditorLayer::resetToggledGroupsAndObjects from 0x1003619b4 to 0x100361a4c (152 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::onClose @ 0x10003ccbc
// > LevelEditorLayer::onPlaytest @ 0x100362d9c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall LevelEditorLayer::resetToggledGroupsAndObjects(LevelEditorLayer *a1)
{
cocos2d::CCArray *m_objects; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
GameObject **arr; // x20
unsigned __int64 v6; // x21
unsigned __int64 i; // x8
m_objects = a1->m_objects;
if ( m_objects )
{
data = m_objects->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (GameObject **)data->arr;
v6 = (unsigned __int64)&arr[num - 1];
do
{
if ( !*arr )
break;
GameObject::resetGroupDisabled(*arr++);
}
while ( (unsigned __int64)arr <= v6 );
}
}
for ( i = 0; i != 10000; ++i )
{
a1->m_toggledGroupStates.__begin_[i] = 0;
*(_QWORD *)&a1->m_toggledGroups.__begin_[(i >> 3) & 0x1FFFFFFFFFFFFFF8LL] &= ~(1LL << i);
}
}