//
// GJBaseGameLayer::checkCollisionBlocks from 0x85b57c to 0x85b754 (472 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::updateCollisionBlocks @ 0x861030
// > GJBaseGameLayer::updateCollisionBlocks @ 0x86106c
// > GJBaseGameLayer::updateCollisionBlocks @ 0x861250
// > ??> @ 0xab000
//
// 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 GJBaseGameLayer::checkCollisionBlocks(
GJBaseGameLayer *a1,
EffectGameObject *a2,
std::vector *a3,
int a4)
{
int m_uniqueID; // w24
const cocos2d::CCRect *v8; // x0
float v9; // s0
float v10; // s8
float v11; // s0
float v12; // s9
float v13; // s0
float v14; // s10
float v15; // s0
float v16; // s11
OBB2D *v17; // x25
__int64 v18; // x19
EffectGameObject *v19; // x20
cocos2d::CCRect *ObjectRectPointer; // x0
float y; // s0
OBB2D *v22; // x28
cocos2d::CCRect v24; // [xsp+98h] [xbp+98h] BYREF
m_uniqueID = a2->m_uniqueID;
v8 = a2->getObjectRect(a2);
cocos2d::CCRect::CCRect(&v24, v8);
cocos2d::CCRect::getMaxX(&v24);
v10 = v9;
cocos2d::CCRect::getMinX(&v24);
v12 = v11;
cocos2d::CCRect::getMaxY(&v24);
v14 = v13;
cocos2d::CCRect::getMinY(&v24);
v16 = v15;
v17 = a2->getOrientedBox(a2);
if ( a4 > 0 )
{
v18 = 0;
do
{
v19 = a3->m_start[v18];
if ( !v19->m_isGroupDisabled )
{
ObjectRectPointer = GameObject::getObjectRectPointer(a3->m_start[v18]);
if ( v10 >= ObjectRectPointer->origin.x
&& v12 <= (float)(ObjectRectPointer->origin.x + ObjectRectPointer->size.width) )
{
y = ObjectRectPointer->origin.y;
if ( v14 >= y && v16 <= (float)(y + ObjectRectPointer->size.height) && m_uniqueID != v19->m_uniqueID )
{
if ( !a2->m_shouldUseOuterOb && !v19->m_shouldUseOuterOb
|| (v22 = v19->getOrientedBox(v19), OBB2D::overlaps1Way(v17)) && OBB2D::overlaps1Way(v22) )
{
a1->objectsCollided(a1, a2->m_itemID, v19->m_itemID);
}
}
}
}
++v18;
}
while ( v18 != (unsigned int)(a4 - 1) + 1LL );
}
}