//
// GJBaseGameLayer::checkCollisionBlocks from 0x10012b760 to 0x10012b8ea (394 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::updateCollisionBlocks @ 0x10012b397
//
// 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)
{
__int64 v7; // rsi
double v8; // xmm0_8
double v9; // xmm0_8
double v10; // xmm0_8
double v11; // xmm0_8
__int64 v12; // r12
__int64 i; // r15
EffectGameObject *v14; // r13
cocos2d::CCRect *ObjectRectPointer; // rax
float y; // xmm0_4
_BYTE v17[16]; // [rsp+8h] [rbp-68h] BYREF
GJBaseGameLayer *v18; // [rsp+18h] [rbp-58h]
OBB2D *v19; // [rsp+20h] [rbp-50h]
OBB2D *v20; // [rsp+28h] [rbp-48h]
float v21; // [rsp+34h] [rbp-3Ch]
float v22; // [rsp+38h] [rbp-38h]
float v23; // [rsp+3Ch] [rbp-34h]
float v24; // [rsp+40h] [rbp-30h]
int m_uniqueID; // [rsp+44h] [rbp-2Ch]
v18 = a1;
m_uniqueID = a2->m_uniqueID;
v7 = ((__int64 (__fastcall *)(EffectGameObject *))a2->getObjectRect)(a2);
sub_10028D180(v17);
v8 = sub_10028D230();
v21 = *(float *)&v8;
v9 = sub_10028D270();
v22 = *(float *)&v9;
v10 = sub_10028D280();
v23 = *(float *)&v10;
v11 = sub_10028D2C0();
v24 = *(float *)&v11;
v20 = (OBB2D *)((__int64 (__fastcall *)(EffectGameObject *, __int64))a2->getOrientedBox)(a2, v7);
if ( a4 > 0 )
{
v12 = (unsigned int)a4;
for ( i = 0; i != v12; ++i )
{
v14 = a3->__begin_[i];
if ( !v14->m_isGroupDisabled )
{
ObjectRectPointer = GameObject::getObjectRectPointer(a3->__begin_[i]);
if ( ObjectRectPointer->origin.x <= v21
&& v22 <= (float)(ObjectRectPointer->origin.x + ObjectRectPointer->size.width) )
{
y = ObjectRectPointer->origin.y;
if ( y <= v23 && v24 <= (float)(y + ObjectRectPointer->size.height) && v14->m_uniqueID != m_uniqueID )
{
if ( !a2->m_shouldUseOuterOb && !v14->m_shouldUseOuterOb
|| (v19 = (OBB2D *)((__int64 (__fastcall *)(EffectGameObject *))v14->getOrientedBox)(v14),
OBB2D::overlaps1Way(v20))
&& OBB2D::overlaps1Way(v19) )
{
((void (__fastcall *)(GJBaseGameLayer *, _QWORD, _QWORD))v18->objectsCollided)(
v18,
(unsigned int)a2->m_itemID,
(unsigned int)v14->m_itemID);
}
}
}
}
}
}
}