//
// GJBaseGameLayer::updateActiveEnterEffect from 0x9c694c to 0x9c6af8 (428 bytes)
//
// 2 xrefs:
// > EffectGameObject::triggerObject @ 0x8986a8
// > ??> @ 0x76030
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:58:32 +0000
//
__int64 __fastcall GJBaseGameLayer::updateActiveEnterEffect(__int64 this, EnterEffectObject *a2)
{
GJBaseGameLayer *v3; // x20
int v4; // w2
int v5; // w21
unsigned int v6; // w2
unsigned int v7; // w2
v3 = (GJBaseGameLayer *)this;
v4 = *((_DWORD *)a2 + 257);
if ( v4 == 55 )
{
v5 = -11;
goto LABEL_9;
}
if ( v4 <= 55 )
{
if ( v4 == 25 )
{
v5 = -7;
goto LABEL_9;
}
if ( v4 <= 25 )
{
v5 = -6;
if ( v4 != 23 )
{
v5 = -5;
if ( v4 != 24 )
v5 = -2;
}
goto LABEL_9;
}
if ( v4 == 27 )
{
v5 = -3;
goto LABEL_9;
}
v5 = -8;
if ( v4 < 27 )
goto LABEL_9;
v5 = -4;
if ( v4 == 28 )
goto LABEL_9;
LABEL_18:
v5 = -2;
LABEL_9:
v6 = *((_DWORD *)a2 + 460);
if ( v6 <= 1 )
{
*(_DWORD *)(*((_QWORD *)v3 + 179) + 4LL * *((int *)a2 + 508)) = v5;
this = GJBaseGameLayer::removeCustomEnterEffects((__int64)v3, *((_DWORD *)a2 + 508), 1);
v6 = *((_DWORD *)a2 + 460);
}
if ( (v6 & 0xFFFFFFFD) == 0 )
{
*(_DWORD *)(*((_QWORD *)v3 + 182) + 4LL * *((int *)a2 + 508)) = v5;
return GJBaseGameLayer::removeCustomEnterEffects((__int64)v3, *((_DWORD *)a2 + 508), 0);
}
return this;
}
if ( v4 == 59 )
{
v5 = -13;
goto LABEL_9;
}
if ( v4 <= 59 )
{
if ( v4 == 57 )
{
v5 = -9;
}
else
{
this = 4294967284LL;
if ( v4 <= 57 )
v5 = -10;
else
v5 = -12;
}
goto LABEL_9;
}
if ( v4 == 1915 )
{
v5 = -14;
goto LABEL_9;
}
if ( v4 < 1915 || (unsigned int)(v4 - 3017) > 4 )
goto LABEL_18;
v7 = *((_DWORD *)a2 + 460);
if ( v7 <= 1 )
{
*(_DWORD *)(*(_QWORD *)(this + 1432) + 4LL * *((int *)a2 + 508)) = -15;
this = GJBaseGameLayer::addCustomEnterEffect((GJBaseGameLayer *)this, a2, 1);
v7 = *((_DWORD *)a2 + 460);
}
if ( (v7 & 0xFFFFFFFD) == 0 )
{
*(_DWORD *)(*((_QWORD *)v3 + 182) + 4LL * *((int *)a2 + 508)) = -15;
return GJBaseGameLayer::addCustomEnterEffect(v3, a2, 0);
}
return this;
}