//
// GJBaseGameLayer::checkCollisionBlocks from 0x1001eb2b4 to 0x1001eb450 (412 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::updateCollisionBlocks @ 0x1001eb0ec
// > GJBaseGameLayer::updateCollisionBlocks @ 0x1001eb128
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GJBaseGameLayer::checkCollisionBlocks(
GJBaseGameLayer *a1,
EffectGameObject *a2,
std::vector *a3,
int a4)
{
int m_uniqueID; // w25
__int64 v9; // x0
float v10; // s8
float v11; // s9
float v12; // s10
float v13; // s11
__int64 v14; // x0
OBB2D *v15; // x22
unsigned __int64 v16; // x26
__int64 v17; // x27
EffectGameObject *v18; // x23
cocos2d::CCRect *ObjectRectPointer; // x0
float y; // s0
OBB2D *v21; // x24
_QWORD v22[2]; // [xsp+0h] [xbp-80h] BYREF
m_uniqueID = a2->m_uniqueID;
v9 = ((__int64 (__fastcall *)(EffectGameObject *))a2->getObjectRect)(a2);
sub_100022B98(v22, v9);
v10 = sub_100022C30((float *)v22);
v11 = sub_100022C40((__int64)v22);
v12 = sub_100022C48((__int64)v22);
v13 = sub_100022C58((__int64)v22);
v14 = ((__int64 (__fastcall *)(EffectGameObject *))a2->getOrientedBox)(a2);
if ( a4 >= 1 )
{
v15 = (OBB2D *)v14;
v16 = 0;
v17 = 8LL * (unsigned int)a4;
do
{
v18 = a3->__begin_[v16 / 8];
if ( !v18->m_isGroupDisabled )
{
ObjectRectPointer = GameObject::getObjectRectPointer(a3->__begin_[v16 / 8]);
if ( v10 >= ObjectRectPointer->origin.x
&& (float)(ObjectRectPointer->origin.x + ObjectRectPointer->size.width) >= v11 )
{
y = ObjectRectPointer->origin.y;
if ( v12 >= y && (float)(y + ObjectRectPointer->size.height) >= v13 && v18->m_uniqueID != m_uniqueID )
{
if ( !a2->m_shouldUseOuterOb && !v18->m_shouldUseOuterOb
|| (v21 = (OBB2D *)((__int64 (__fastcall *)(EffectGameObject *))v18->getOrientedBox)(v18),
OBB2D::overlaps1Way(v15))
&& OBB2D::overlaps1Way(v21) )
{
((void (__fastcall *)(GJBaseGameLayer *, _QWORD, _QWORD))a1->objectsCollided)(
a1,
(unsigned int)a2->m_itemID,
(unsigned int)v18->m_itemID);
}
}
}
}
v16 += 8LL;
}
while ( v17 != v16 );
}
}