//
// cocos2d::CCDrawNode::is_segment_on_screen from 0x180015490 to 0x180015559 (201 bytes)
//
// 3 xrefs:
// > cocos2d::CCDrawNode::drawSegmentEx @ 0x180014502
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ae4ac
//
// 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
//
char __fastcall cocos2d::CCDrawNode::is_segment_on_screen(
cocos2d::CCDrawNode *this,
const struct cocos2d::CCRect *a2,
const struct cocos2d::CCPoint *a3,
const struct cocos2d::CCPoint *a4)
{
float x; // xmm3_4
float y; // xmm4_4
float v6; // xmm5_4
float v7; // xmm6_4
float m_fMaxAreaY; // xmm0_4
float m_fMinAreaY; // xmm0_4
float m_fMaxAreaX; // xmm0_4
float m_fMinAreaX; // xmm0_4
x = a3->x;
y = a3->y;
v6 = a4->x;
v7 = a4->y;
if ( fabs(y - v7) <= fabs(a3->x - a4->x) )
{
if ( this->m_fMinAreaY <= y && y <= this->m_fMaxAreaY )
{
m_fMaxAreaX = this->m_fMaxAreaX;
if ( x <= m_fMaxAreaX || v6 <= m_fMaxAreaX )
{
m_fMinAreaX = this->m_fMinAreaX;
if ( m_fMinAreaX <= x || m_fMinAreaX <= v6 )
return 1;
}
}
}
else if ( this->m_fMinAreaX <= x && x <= this->m_fMaxAreaX )
{
m_fMaxAreaY = this->m_fMaxAreaY;
if ( y <= m_fMaxAreaY || v7 <= m_fMaxAreaY )
{
m_fMinAreaY = this->m_fMinAreaY;
if ( m_fMinAreaY <= y || m_fMinAreaY <= v7 )
return 1;
}
}
return 0;
}