//
// LevelEditorLayer::toggleGroupPreview from 0x1003615b4 to 0x1003616a0 (236 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x100360f98
//
// 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::toggleGroupPreview(LevelEditorLayer *a1, int a2, bool a3)
{
_BOOL4 v3; // w19
cocos2d::CCArray *TriggerGroup; // x0
cocos2d::ccArray *data; // x9
__int64 num; // x8
GameObject **arr; // x22
unsigned __int64 v10; // x23
cocos2d::ccArray *v11; // x9
__int64 v12; // x8
GameObject **v13; // x22
unsigned __int64 v14; // x23
v3 = a3;
if ( GJEffectManager::isGroupEnabled(a1->m_effectManager, a2) != a3 )
{
a1->m_toggledGroupStates.__begin_[a2] = 2;
TriggerGroup = LevelEditorLayer::getTriggerGroup(a1, a2);
if ( v3 )
{
if ( TriggerGroup )
{
data = TriggerGroup->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (GameObject **)data->arr;
v10 = (unsigned __int64)&arr[num - 1];
do
{
if ( !*arr )
break;
GameObject::groupWasEnabled(*arr++);
}
while ( (unsigned __int64)arr <= v10 );
}
}
}
else if ( TriggerGroup )
{
v11 = TriggerGroup->data;
v12 = v11->num;
if ( (_DWORD)v12 )
{
v13 = (GameObject **)v11->arr;
v14 = (unsigned __int64)&v13[v12 - 1];
do
{
if ( !*v13 )
break;
GameObject::groupWasDisabled(*v13++);
}
while ( (unsigned __int64)v13 <= v14 );
}
}
GJEffectManager::toggleGroup(a1->m_effectManager, a2, v3);
}
}