//
// GJBaseGameLayer::checkCollisionBlocks from 0x1001093b0 to 0x10010954d (413 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::updateCollisionBlocks @ 0x100108f00
// > GJBaseGameLayer::updateCollisionBlocks @ 0x100109397
//
// 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:33 +0000
//
__int64 __fastcall GJBaseGameLayer::checkCollisionBlocks(_DWORD *a1, _DWORD *a2, __int64 *a3, int a4)
{
__int64 v7; // rsi
__int64 v8; // rax
__int64 result; // rax
__int64 v10; // r12
__int64 i; // r14
__int64 v12; // r13
float v13; // xmm0_4
_BYTE v14[16]; // [rsp+8h] [rbp-68h] BYREF
__int64 v15; // [rsp+18h] [rbp-58h]
_DWORD *v16; // [rsp+20h] [rbp-50h]
__int64 v17; // [rsp+28h] [rbp-48h]
float v18; // [rsp+34h] [rbp-3Ch]
float v19; // [rsp+38h] [rbp-38h]
float v20; // [rsp+3Ch] [rbp-34h]
float v21; // [rsp+40h] [rbp-30h]
unsigned int v22; // [rsp+44h] [rbp-2Ch]
v22 = a2[229];
v7 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1328LL))(a2);
sub_1002787F0(v14, v7);
v18 = sub_1002788A0(v14);
v19 = sub_1002788E0(v14);
v20 = sub_1002788F0(v14);
v21 = sub_100278930(v14);
v8 = *(_QWORD *)a2;
v16 = a2;
result = (*(__int64 (__fastcall **)(_DWORD *))(v8 + 1560))(a2);
v17 = result;
if ( a4 > 0 )
{
v10 = (unsigned int)a4;
for ( i = 0; i != v10; ++i )
{
result = *a3;
v12 = *(_QWORD *)(*a3 + 8 * i);
if ( !*(_BYTE *)(v12 + 650) )
{
result = *(unsigned int *)(v12 + 1836);
if ( (_DWORD)result != a1[824] )
{
result = GameObject::getObjectRectPointer(*(_QWORD *)(*a3 + 8 * i));
if ( *(float *)result <= v18 && v19 <= (float)(*(float *)result + *(float *)(result + 8)) )
{
v13 = *(float *)(result + 4);
if ( v13 <= v20 && v21 <= (float)(v13 + *(float *)(result + 12)) )
{
result = v22;
if ( *(_DWORD *)(v12 + 916) != v22 )
{
if ( !*((_BYTE *)v16 + 744) && *(_BYTE *)(v12 + 744) != 1
|| (v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 1560LL))(v12),
result = OBB2D::overlaps1Way(v17, v15),
(_BYTE)result)
&& (result = OBB2D::overlaps1Way(v15, v17), (_BYTE)result) )
{
result = (*(__int64 (__fastcall **)(_DWORD *, _QWORD, _QWORD))(*(_QWORD *)a1 + 1224LL))(
a1,
(unsigned int)v16[420],
*(unsigned int *)(v12 + 1680));
}
}
}
}
}
}
}
}
return result;
}