//
// GJBaseGameLayer::controlTriggersInGroup from 0x5b1ce4 to 0x5b1eb2 (462 bytes)
//
// 1 xrefs:
// > TriggerControlGameObject::triggerObject @ 0x4e6934
//
// 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:33 +0000
//
_DWORD *__fastcall GJBaseGameLayer::controlTriggersInGroup(GJEffectManager **a1, int a2, int a3)
{
_DWORD *result; // r0
_DWORD *v6; // r2
int *v7; // r7
int *v8; // r6
int v9; // r11
int v10; // t1
int v11; // r3
int v12; // r2
int v13; // r0
int v14; // r1
_DWORD *v15; // r2
result = GJBaseGameLayer::getGroup((GJBaseGameLayer *)a1, a2);
if ( result )
{
v6 = (_DWORD *)result[13];
if ( *v6 )
{
v7 = (int *)v6[3];
v8 = &v7[*v6 - 1];
while ( 1 )
{
while ( 1 )
{
while ( 1 )
{
do
{
if ( v7 <= v8 )
{
v10 = *v7++;
v9 = v10;
if ( v10 )
continue;
}
return result;
}
while ( !*(_BYTE *)(v9 + 1092) );
v11 = *(_DWORD *)(v9 + 892);
if ( v11 > 2924 )
break;
if ( v11 < 2919 )
{
if ( v11 == 2903 )
{
result = (_DWORD *)GJBaseGameLayer::controlGradientTrigger(
(GJBaseGameLayer *)a1,
(GradientTriggerObject *)v9,
a3);
}
else if ( v11 > 2903 )
{
if ( v11 != 2907 )
{
if ( v11 > 2907 )
{
if ( (unsigned int)(v11 - 2909) > 8 )
goto LABEL_47;
}
else if ( v11 > 2905 )
{
goto LABEL_47;
}
}
}
else
{
if ( v11 == 1913 )
goto LABEL_46;
if ( v11 > 1913 )
{
if ( v11 == 1916 )
goto LABEL_46;
v12 = 2015;
LABEL_28:
if ( v11 == v12 )
{
LABEL_46:
result = (_DWORD *)GJGameState::controlTweenAction((int)(a1 + 82), *(_DWORD *)(v9 + 780), -1, a3);
}
else
{
LABEL_47:
if ( v11 == 1346 )
{
if ( *(_BYTE *)(v9 + 1356) )
GJBaseGameLayer::controlDynamicRotateCommand((int)a1, v9, -1, a3);
}
else if ( v11 == 901 && *(_BYTE *)(v9 + 1356) )
{
GJBaseGameLayer::controlDynamicMoveCommand((int)a1, v9, -1, a3);
}
result = (_DWORD *)GJEffectManager::controlActionsForTrigger(a1[381]);
}
}
else
{
if ( v11 != 1615 )
goto LABEL_47;
*(_BYTE *)(v9 + 1692) = a3 != 2;
}
}
}
}
if ( v11 == 3009 )
{
v13 = (int)a1;
v14 = v9;
v15 = a1 + 299;
goto LABEL_41;
}
if ( v11 > 3009 )
break;
if ( v11 == 3006 )
{
v13 = (int)a1;
v14 = v9;
v15 = a1 + 290;
}
else
{
if ( v11 <= 3006 )
{
v12 = 2999;
goto LABEL_28;
}
if ( v11 == 3007 )
{
v15 = a1 + 293;
v13 = (int)a1;
v14 = v9;
}
else
{
v13 = (int)a1;
v14 = v9;
v15 = a1 + 296;
}
}
LABEL_41:
result = (_DWORD *)GJBaseGameLayer::controlAreaEffect(v13, v14, v15, a3);
}
if ( v11 == 3016 )
{
result = (_DWORD *)GJBaseGameLayer::controlAdvancedFollowCommand((int)a1, v9, -1, a3);
}
else
{
if ( v11 <= 3016 )
{
if ( v11 != 3010 )
goto LABEL_47;
v13 = (int)a1;
v14 = v9;
v15 = a1 + 302;
goto LABEL_41;
}
if ( v11 == 3602 )
{
result = GJBaseGameLayer::stopSFXTrigger(a1, (SFXTriggerGameObject *)v9);
}
else
{
if ( v11 != 3604 )
goto LABEL_47;
result = GJBaseGameLayer::controlEventLink(a1, *(_DWORD *)(v9 + 780), -1, a3);
}
}
}
}
}
return result;
}