//
// GJBaseGameLayer::triggerAdvancedFollowEditCommand from 0x5a70ec to 0x5a727e (402 bytes)
//
// 1 xrefs:
// > EffectGameObject::triggerObject @ 0x4f4eda
//
// 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:53:21 +0000
//
float __fastcall GJBaseGameLayer::triggerAdvancedFollowEditCommand(float this, AdvancedFollowEditObject *a2)
{
float v3; // r4
int v4; // r2
_DWORD *v5; // r8
int *v6; // r5
int v7; // r10
int v8; // r6
unsigned int v9; // r7
int v10; // r6
cocos2d::CCObject *Group; // r0
cocos2d::CCObject *v12; // r0
int v13; // r5
int v14; // r1
int v15; // r2
int v16; // r3
_DWORD *v17; // r2
int v18; // r3
float *v19; // r2
float *v20; // r3
float v21; // t1
int *v22; // r6
int *v23; // r1
int v24; // r7
int v25; // [sp+4h] [bp-18h]
int *v26; // [sp+8h] [bp-14h]
int SpecialKey; // [sp+10h] [bp-Ch] BYREF
v3 = this;
v4 = *((_DWORD *)a2 + 223);
if ( v4 == 3660 )
{
if ( *((_BYTE *)a2 + 1496) )
{
v5 = (_DWORD *)(LODWORD(this) + 2396);
v6 = *(int **)(LODWORD(this) + 1244);
v25 = *((_DWORD *)a2 + 321);
v26 = *(int **)(LODWORD(this) + 1248);
while ( v6 != v26 )
{
if ( v6[3] == v25 )
{
SpecialKey = GJBaseGameLayer::getSpecialKey(
(GJBaseGameLayer *)LODWORD(v3),
v6[1],
*(unsigned __int8 *)(*v6 + 1640),
*(unsigned __int8 *)(*v6 + 1641));
if ( std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find(
v5,
(unsigned int *)&SpecialKey) )
{
v7 = *std::unordered_map>::operator[]((int)v5, (unsigned int *)&SpecialKey);
if ( v7 <= 0 )
v8 = 1;
else
v8 = 2;
}
else
{
v7 = 0;
v8 = 1;
}
v9 = v7 - 1;
v10 = v8 + v7 - 1;
do
{
if ( v7 <= 0 )
Group = GJBaseGameLayer::getGroup((GJBaseGameLayer *)LODWORD(v3), v6[1]);
else
Group = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(
*(cocos2d::CCArray **)(LODWORD(v3) + 2392),
v9);
++v9;
this = GJBaseGameLayer::modifyGroupPhysics(v3, (int)a2, (int)Group);
}
while ( v9 != v10 );
}
v6 += 7;
}
}
else
{
v12 = GJBaseGameLayer::getGroup((GJBaseGameLayer *)LODWORD(this), *((_DWORD *)a2 + 321));
return GJBaseGameLayer::modifyGroupPhysics(v3, (int)a2, (int)v12);
}
}
else
{
if ( v4 != 3661 )
return this;
v13 = *((_DWORD *)a2 + 322);
if ( *((_BYTE *)a2 + 1504) )
{
v13 = -1;
}
else if ( *((_BYTE *)a2 + 1505) )
{
v13 = -2;
}
else if ( *((_BYTE *)a2 + 1506) )
{
v13 = -3;
}
else if ( !v13 )
{
return this;
}
if ( *((_BYTE *)a2 + 1496) )
{
v14 = *((_DWORD *)a2 + 321);
v15 = *(_DWORD *)(LODWORD(this) + 1248);
v16 = *(_DWORD *)(LODWORD(this) + 1244);
while ( v16 != v15 )
{
this = *(float *)(v16 + 12);
v16 += 28;
if ( LODWORD(this) == v14 )
*(_DWORD *)(v16 - 20) = v13;
}
}
else
{
this = COERCE_FLOAT(GJBaseGameLayer::getGroup((GJBaseGameLayer *)LODWORD(this), *((_DWORD *)a2 + 321)));
if ( this != 0.0 )
{
v17 = *(_DWORD **)(LODWORD(this) + 52);
if ( *v17 )
{
v18 = *v17 + 0x40000000;
v19 = (float *)v17[3];
v20 = &v19[v18 - 1];
while ( v19 <= v20 )
{
v21 = *v19++;
this = v21;
if ( v21 == 0.0 )
break;
if ( *(_DWORD *)(LODWORD(this) + 892) == 3016 )
{
v22 = *(int **)(LODWORD(v3) + 1248);
v23 = *(int **)(LODWORD(v3) + 1244);
while ( v23 != v22 )
{
v24 = *v23;
v23 += 7;
if ( v24 == LODWORD(this) )
*(v23 - 5) = v13;
}
}
}
}
}
}
}
return this;
}