//
// GJBaseGameLayer::controlAreaEffect from 0x5a1bdc to 0x5a1c68 (140 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::controlTriggersInGroup @ 0x5b1e24
//
// 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:17 +0000
//
int __fastcall GJBaseGameLayer::controlAreaEffect(int a1, int a2, _DWORD *a3, int a4)
{
unsigned int v4; // r5
int v8; // r3
int result; // r0
int v10; // r1
int i; // r4
int v12; // r1
int v13; // r0
int v14; // r0
char **v15; // r0
int v16; // [sp+4h] [bp-8h]
v4 = 0;
while ( 1 )
{
v8 = a3[1];
result = -1030792151;
if ( v4 >= -1030792151 * ((v8 - *a3) >> 3) )
return result;
v10 = *a3 + 200 * v4;
if ( *(_DWORD *)(v10 + 152) != a2 )
goto LABEL_14;
if ( a4 )
{
if ( a4 == 1 )
{
*(_BYTE *)(v10 + 176) = 1;
*(_BYTE *)(v10 + 177) = 1;
}
else if ( a4 == 2 )
{
*(_BYTE *)(v10 + 176) = 0;
*(_BYTE *)(v10 + 177) = 0;
}
LABEL_14:
++v4;
}
else
{
for ( i = v10 + 200; i != v8; i += 200 )
{
v12 = i;
v13 = i - 200;
v16 = v8;
EnterEffectInstance::operator=(v13, v12);
v8 = v16;
}
while ( 1 )
{
v14 = a3[1];
if ( i - 200 == v14 )
break;
v15 = (char **)(v14 - 200);
a3[1] = v15;
EnterEffectInstance::~EnterEffectInstance(v15);
}
}
}
}