//
// LevelEditorLayer::spawnGroupPreview from 0x467cf0 to 0x467f60 (624 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::activateTriggerEffect @ 0x467c60
// > LevelEditorLayer::updateGameObjects @ 0x46d05e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:48:57 +0000
//
void __fastcall LevelEditorLayer::spawnGroupPreview(
LevelEditorLayer *this,
int a2,
float a3,
float a4,
float a5,
float a6,
float a7,
bool a8,
bool a9)
{
int v13; // r9
float *v14; // r3
unsigned int v15; // r11
cocos2d::CCObject *TriggerGroup; // r0
char v17; // r4
cocos2d::CCObject *v18; // r10
_DWORD *v19; // r3
int **v20; // r6
float v21; // s19
int v22; // r11
int **v23; // r9
int *v24; // r4
int *v25; // t1
_DWORD *v26; // r3
int *v27; // r6
int *v28; // r10
int v29; // r4
int v30; // t1
int v31; // r2
double v32; // d7
bool v33; // r3
double v34; // d7
int v35; // s15
bool v36; // r3
v13 = a8;
if ( a2 > 0 )
{
if ( GJEffectManager::isGroupEnabled(*((GJEffectManager **)this + 381), a2) )
{
if ( a4 <= a6 )
{
v14 = (float *)(*((_DWORD *)this + 3018) + 4 * a2);
if ( *v14 < a4 )
{
*v14 = a4;
v15 = (unsigned int)a2 >> 5;
TriggerGroup = LevelEditorLayer::getTriggerGroup(this, a2);
v17 = a2 & 0x1F;
v18 = TriggerGroup;
if ( ((1 << v17) & *(_DWORD *)(*((_DWORD *)this + 2994) + 4 * v15)) == 0 )
{
if ( cocos2d::CCArray::count(TriggerGroup) > 1u )
qsort(
*(void **)(*((_DWORD *)v18 + 13) + 12),
**((_DWORD **)v18 + 13),
4u,
(int (*)(const void *, const void *))xCompReal);
*(_DWORD *)(*((_DWORD *)this + 2994) + 4 * v15) |= 1 << v17;
}
if ( a8 )
{
if ( v18 )
{
v19 = *((_DWORD **)v18 + 13);
if ( *v19 )
{
v20 = (int **)v19[3];
v21 = 0.0;
v22 = 0;
v23 = &(&v20[*v19])[-1];
while ( 1 )
{
do
{
if ( v20 <= v23 )
{
v25 = *v20++;
v24 = v25;
if ( v25 )
continue;
}
return;
}
while ( !*((_BYTE *)v24 + 1088)
|| !*((_BYTE *)v24 + 1293)
|| !*((_BYTE *)v24 + 1484) && *((_BYTE *)v24 + 1264) );
v31 = *v24;
if ( !v22 )
break;
v32 = (float)((float)(*(float *)(*(int (__fastcall **)(int *))(v31 + 96))(v24) - v21) / 311.58);
if ( v32 == 0.0 )
{
LABEL_29:
*((float *)v24 + 406) = a4;
v24[370] = 0;
v33 = a9 && a4 > *(float *)(*((_DWORD *)this + 2970) + 356);
v22 = 1;
LevelEditorLayer::activateTriggerEffect(this, (EffectGameObject *)v24, a5, a6, a7, v33);
(*(void (__fastcall **)(int *, _DWORD))(*v24 + 744))(v24, LODWORD(a3));
}
else
{
v34 = a4 + v32;
if ( v34 <= a6 )
{
*(float *)&v35 = v34;
LevelEditorLayer::addDelayedSpawn((int)this, (EffectGameObject *)v24, v35);
}
}
}
v21 = *(float *)(*(int (__fastcall **)(int *))(v31 + 96))(v24);
goto LABEL_29;
}
}
}
else if ( v18 )
{
v26 = *((_DWORD **)v18 + 13);
if ( *v26 )
{
v27 = (int *)v26[3];
v28 = &v27[*v26 - 1];
while ( v27 <= v28 )
{
v30 = *v27++;
v29 = v30;
if ( !v30 )
break;
if ( *(_BYTE *)(v29 + 1088)
&& *(_BYTE *)(v29 + 1293)
&& (*(_BYTE *)(v29 + 1484) || !*(_BYTE *)(v29 + 1264)) )
{
*(float *)(v29 + 1624) = a4;
*(_DWORD *)(v29 + 1480) = v13++;
v36 = a9 && a4 > *(float *)(*((_DWORD *)this + 2970) + 356);
LevelEditorLayer::activateTriggerEffect(this, (EffectGameObject *)v29, a5, a6, a7, v36);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v29 + 744))(v29, LODWORD(a3));
}
}
}
}
}
}
}
}
}