//
// cocos2d::ccpLineIntersect from 0x1001aea80 to 0x1001aeb4c (204 bytes)
//
// 2 xrefs:
// > cocos2d::ccpIntersectPoint @ 0x1001aeb74
// > cocos2d::CCProgressTimer::updateRadial @ 0x1003fdbdc
//
// 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
//
bool __fastcall cocos2d::ccpLineIntersect(
const cocos2d::CCPoint *a1,
const cocos2d::CCPoint *a2,
const cocos2d::CCPoint *a3,
const cocos2d::CCPoint *a4,
float *a5,
float *a6)
{
float x; // s0
float v7; // s2
float y; // s4
float v9; // s5
float v11; // s1
float v12; // s7
float v13; // s6
float v14; // s3
float v15; // s5
float v16; // s2
float v17; // s4
float v18; // s0
float v19; // s1
float v20; // s2
x = a1->x;
if ( a1->x == a2->x && a1->y == a2->y )
return 0;
v7 = a3->x;
if ( a3->x == a4->x )
{
y = a3->y;
v9 = a4->y;
if ( y == v9 )
return 0;
}
else
{
v9 = a4->y;
y = a3->y;
}
v11 = a2->x - x;
v12 = a1->y;
v13 = a2->y - v12;
v14 = a4->x - v7;
v15 = v9 - y;
v16 = x - v7;
v17 = v12 - y;
v18 = (float)(v15 * v11) - (float)(v14 * v13);
*a5 = (float)(v14 * v17) - (float)(v15 * v16);
v19 = (float)(v11 * v17) - (float)(v13 * v16);
*a6 = v19;
v20 = *a5;
if ( v18 == 0.0 )
return v19 == 0.0 || v20 == 0.0;
*a5 = v20 / v18;
*a6 = *a6 / v18;
return 1;
}