//
// LevelEditorLayer::toggleGroupPreview from 0x368260 to 0x3682f4 (148 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x36de9e
//
// 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 LevelEditorLayer::toggleGroupPreview(LevelEditorLayer *a1, int a2, bool a3)
{
_BOOL4 v4; // r7
cocos2d::CCArray *TriggerGroup; // r0
cocos2d::ccArray *data; // r2
unsigned int num; // r3
cocos2d::CCObject **arr; // r2
unsigned int v10; // r4
GameObject **v11; // r8
GameObject *v12; // r0
GameObject *v13; // t1
cocos2d::ccArray *v14; // r2
unsigned int v15; // r3
cocos2d::CCObject **v16; // r2
unsigned int v17; // r4
GameObject **v18; // r8
GameObject *v19; // r0
GameObject *v20; // t1
v4 = a3;
if ( GJEffectManager::isGroupEnabled(a1->m_effectManager, a2) != a3 )
{
a1->m_toggledGroupStates.m_start[a2] = 2;
TriggerGroup = LevelEditorLayer::getTriggerGroup(a1, a2);
if ( v4 )
{
if ( TriggerGroup )
{
data = TriggerGroup->data;
num = data->num;
if ( data->num )
{
arr = data->arr;
v10 = (unsigned int)(&arr[num] + 0x3FFFFFFF);
v11 = (GameObject **)arr;
while ( (unsigned int)v11 <= v10 )
{
v13 = *v11++;
v12 = v13;
if ( !v13 )
break;
GameObject::groupWasEnabled(v12);
}
}
}
}
else if ( TriggerGroup )
{
v14 = TriggerGroup->data;
v15 = v14->num;
if ( v14->num )
{
v16 = v14->arr;
v17 = (unsigned int)(&v16[v15] + 0x3FFFFFFF);
v18 = (GameObject **)v16;
while ( (unsigned int)v18 <= v17 )
{
v20 = *v18++;
v19 = v20;
if ( !v20 )
break;
GameObject::groupWasDisabled(v19);
}
}
}
GJEffectManager::toggleGroup(a1->m_effectManager, a2, v4);
}
}