//
// GJBaseGameLayer::playerCircleCollision from 0x140318cd0 to 0x140318f84 (692 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x14031bb77
// > GJBaseGameLayer::collisionCheckObjects @ 0x14031be78
// > ??> @ 0x1408b4f68
// > ??> @ 0x1408b4f78
// > ??> @ 0x14091ea7c
//
// 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 11:30:19 +0000
//
bool __fastcall GJBaseGameLayer::playerCircleCollision(__int64 a1, __int64 a2, float *a3)
{
__int64 (__fastcall *v5)(__int64); // rdi
const struct cocos2d::CCPoint *v6; // rbx
cocos2d *v7; // rax
const struct cocos2d::CCPoint *v8; // r8
float v9; // xmm0_4
float v10; // xmm6_4
float v11; // xmm6_4
bool result; // al
const struct cocos2d::CCRect *v13; // rax
float v14; // xmm6_4
float v15; // xmm6_4
float MaxX; // xmm7_4
float MinX; // xmm8_4
float MaxY; // xmm10_4
float MinY; // xmm9_4
cocos2d *v20; // rax
const struct cocos2d::CCPoint *v21; // r8
cocos2d *v22; // rax
const struct cocos2d::CCPoint *v23; // r8
cocos2d *v24; // rax
const struct cocos2d::CCPoint *v25; // r8
cocos2d *v26; // rax
const struct cocos2d::CCPoint *v27; // r8
_BYTE v28[8]; // [rsp+20h] [rbp-98h] BYREF
_BYTE v29[8]; // [rsp+28h] [rbp-90h] BYREF
_BYTE v30[8]; // [rsp+30h] [rbp-88h] BYREF
_BYTE v31[24]; // [rsp+38h] [rbp-80h] BYREF
char v32; // [rsp+C0h] [rbp+8h] BYREF
char v33; // [rsp+D8h] [rbp+20h] BYREF
if ( *(_BYTE *)(*(_QWORD *)(a1 + 3528) + 463LL) )
{
v5 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 200LL);
v6 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(float *, char *))(*(_QWORD *)a3 + 1208LL))(
a3,
&v32);
v7 = (cocos2d *)v5(a2);
v9 = cocos2d::ccpDistance(v7, v6, v8);
v10 = a3[290];
if ( v10 == 1.0 && a3[291] == 1.0 )
v11 = a3[227];
else
v11 = fmaxf(v10, a3[291]) * a3[227];
return (float)((float)(*(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1184LL))(a2) + 8) * 0.5) + v11) >= v9;
}
else
{
v13 = (const struct cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1184LL))(a2);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v31, v13);
v14 = a3[290];
if ( v14 == 1.0 && a3[291] == 1.0 )
v15 = a3[227];
else
v15 = fmaxf(v14, a3[291]) * a3[227];
(*(void (__fastcall **)(float *, char *))(*(_QWORD *)a3 + 1208LL))(a3, &v32);
MaxX = cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v31);
MinX = cocos2d::CCRect::getMinX((cocos2d::CCRect *)v31);
MaxY = cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v31);
MinY = cocos2d::CCRect::getMinY((cocos2d::CCRect *)v31);
result = true;
if ( !cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v31, (const struct cocos2d::CCPoint *)&v32) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v33, MaxX, MaxY);
if ( v15 <= fabs(cocos2d::ccpDistance(v20, (const struct cocos2d::CCPoint *)&v32, v21)) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, MaxX, MinY);
if ( v15 <= fabs(cocos2d::ccpDistance(v22, (const struct cocos2d::CCPoint *)&v32, v23)) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, MinX, MinY);
if ( v15 <= COERCE_FLOAT(
COERCE_UNSIGNED_INT(cocos2d::ccpDistance(v24, (const struct cocos2d::CCPoint *)&v32, v25))
& 0x7FFFFFFF) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, MinX, MaxY);
if ( v15 <= fabs(cocos2d::ccpDistance(v26, (const struct cocos2d::CCPoint *)&v32, v27)) )
return false;
}
}
}
}
}
return result;
}