//
// GJBaseGameLayer::playerTouchedTrigger from 0x100105f40 to 0x1001061aa (618 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x100104a99
//
// This function is hookable on this platform (idp: pc, 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:21:31 +0000
//
void __fastcall GJBaseGameLayer::playerTouchedTrigger(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // r14
__int64 v5; // r12
__int64 v6; // rdx
__int64 v7; // r13
__int64 v8; // rax
__int64 *v9; // rcx
int v10; // esi
int v11; // esi
__int64 v12; // r15
int v13; // ecx
_QWORD *v14; // r14
char *v15; // r15
int v16; // eax
int v17; // eax
__int64 v18; // r12
__int64 v19; // rax
unsigned int v20; // r15d
__int64 v21; // [rsp+10h] [rbp-60h]
char *v22; // [rsp+18h] [rbp-58h]
void *__p[2]; // [rsp+20h] [rbp-50h] BYREF
__int64 v24; // [rsp+30h] [rbp-40h]
__int64 v25; // [rsp+38h] [rbp-38h]
int v26; // [rsp+44h] [rbp-2Ch]
v4 = a2;
v5 = a1;
if ( *(_BYTE *)(a1 + 13169) == 1 && *(_BYTE *)(a3 + 1259) )
return;
if ( *(_DWORD *)(a3 + 1028) == 3640 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a3 + 1824LL))(a3, *(unsigned int *)(a1 + 944));
if ( *(_BYTE *)(a3 + 1472) != 1 )
return;
v6 = 0;
if ( !*(_BYTE *)(a3 + 1740) )
v6 = *(unsigned int *)(a2 + 916);
v7 = *(unsigned int *)(a3 + 916);
v8 = *(_QWORD *)(a1 + 1176);
if ( !v8 )
{
LABEL_18:
if ( !*(_BYTE *)(a3 + 1664) )
goto LABEL_33;
v12 = v6;
GJEffectManager::removeTriggeredID(*(_QWORD *)(a1 + 2152), (unsigned int)v7);
v6 = v12;
v8 = *(_QWORD *)(a1 + 1176);
goto LABEL_20;
}
v9 = *(__int64 **)(a1 + 1176);
while ( 1 )
{
v10 = *((_DWORD *)v9 + 7);
if ( (int)v7 < v10 )
goto LABEL_11;
if ( (int)v7 <= v10 )
{
v11 = *((_DWORD *)v9 + 8);
if ( (int)v6 < v11 )
goto LABEL_11;
if ( (int)v6 <= v11 )
break;
}
++v9;
LABEL_11:
v9 = (__int64 *)*v9;
if ( !v9 )
goto LABEL_18;
}
if ( !*(_BYTE *)(a3 + 1664) )
goto LABEL_33;
LABEL_20:
v25 = v4;
v13 = *(_DWORD *)(a1 + 944);
if ( v8 )
{
while ( 1 )
{
v15 = (char *)v8;
v16 = *(_DWORD *)(v8 + 28);
if ( (int)v7 < v16 )
goto LABEL_22;
if ( (int)v7 > v16 )
goto LABEL_27;
v17 = *((_DWORD *)v15 + 8);
if ( (int)v6 < v17 )
{
LABEL_22:
v8 = *(_QWORD *)v15;
v14 = v15;
if ( !*(_QWORD *)v15 )
goto LABEL_29;
}
else
{
if ( (int)v6 <= v17 )
{
v4 = v25;
goto LABEL_32;
}
LABEL_27:
v8 = *((_QWORD *)v15 + 1);
if ( !v8 )
{
v14 = v15 + 8;
goto LABEL_29;
}
}
}
}
v14 = (_QWORD *)(a1 + 1176);
v15 = (char *)(a1 + 1176);
LABEL_29:
v26 = *(_DWORD *)(a1 + 944);
v22 = v15;
v21 = v6;
v18 = v6 << 32;
v15 = (char *)operator new(0x28u);
*(_QWORD *)(v15 + 28) = v7 | v18;
v5 = a1;
*((_DWORD *)v15 + 9) = 0;
*(_OWORD *)v15 = 0;
*((_QWORD *)v15 + 2) = v22;
*v14 = v15;
v19 = **(_QWORD **)(a1 + 1168);
if ( v19 )
*(_QWORD *)(a1 + 1168) = v19;
sub_10001B680(*(__int64 **)(a1 + 1176), (__int64 *)v15);
++*(_QWORD *)(a1 + 1184);
v4 = v25;
v6 = v21;
v13 = v26;
LABEL_32:
*((_DWORD *)v15 + 9) = v13;
LABEL_33:
v20 = v6;
if ( !(unsigned __int8)GJEffectManager::hasBeenTriggered(*(_QWORD *)(v5 + 2152), (unsigned int)v7, v6) )
{
GJEffectManager::storeTriggeredID(*(_QWORD *)(v5 + 2152), (unsigned int)v7, v20);
if ( *(_DWORD *)(a3 + 1028) == 1268 )
{
*(_OWORD *)__p = 0;
v24 = 0;
SpawnTriggerGameObject::updateRemapKeys(a3, __p);
if ( __p[0] )
{
__p[1] = __p[0];
operator delete(__p[0]);
}
}
(*(void (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(*(_QWORD *)a3 + 1296LL))(
a3,
v5,
*(unsigned int *)(v4 + 916),
0);
}
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)a3 + 1488LL))(a3, 0.0);
}