//
// GJBaseGameLayer::activatePlayerControlTrigger from 0x100285d18 to 0x100285e74 (348 bytes)
//
// 1 xrefs:
// > EffectGameObject::triggerObject @ 0x10042bc80
//
// 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 11:01:57 +0000
//
__int64 __fastcall GJBaseGameLayer::activatePlayerControlTrigger(__int64 result, _BYTE *a2)
{
__int64 v3; // x19
char v4; // w25
int v5; // w23
int v6; // w22
int v7; // w21
char v8; // w24
char v10; // w25
char v11; // w24
v3 = result;
v4 = a2[1684];
v5 = (unsigned __int8)a2[1840];
v6 = (unsigned __int8)a2[1841];
v7 = (unsigned __int8)a2[1842];
v8 = a2[1685];
if ( (v4 & 1) == 0 && (a2[1685] & 1) != 0 )
goto LABEL_15;
if ( a2[1840] )
result = PlayerObject::releaseButton(*(_QWORD *)(result + 3256), 1);
if ( *(_BYTE *)(v3 + 12238) == 1 && v6 != 0 )
{
PlayerObject::releaseButton(*(_QWORD *)(v3 + 3256), 5);
PlayerObject::releaseButton(*(_QWORD *)(v3 + 3256), 2);
result = PlayerObject::releaseButton(*(_QWORD *)(v3 + 3256), 3);
}
v10 = v4 ^ 1;
if ( v7 )
result = sub_1002BB1D8(*(_QWORD *)(v3 + 3256), 1, 0);
v11 = v10 | v8;
if ( a2[1843] == 1 )
result = sub_1002BB3D8(*(_QWORD *)(v3 + 3256), 543);
if ( (v11 & 1) != 0 )
{
LABEL_15:
if ( v5 )
result = PlayerObject::releaseButton(*(_QWORD *)(v3 + 3264), 1);
if ( *(_BYTE *)(v3 + 12238) == 1 && v6 != 0 )
{
PlayerObject::releaseButton(*(_QWORD *)(v3 + 3264), 5);
PlayerObject::releaseButton(*(_QWORD *)(v3 + 3264), 2);
result = PlayerObject::releaseButton(*(_QWORD *)(v3 + 3264), 3);
}
if ( v7 )
result = sub_1002BB1D8(*(_QWORD *)(v3 + 3264), 1, 0);
if ( a2[1843] == 1 )
return sub_1002BB3D8(*(_QWORD *)(v3 + 3264), 543);
}
return result;
}