//
// CCCircleWave::draw from 0x5a60dc to 0x5a620c (304 bytes)
//
// 3 xrefs:
// > ??> @ 0x55290
// > ??> @ 0x1141bf8
// > ??> @ 0x1141f78
//
// 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 CCCircleWave::draw(CCCircleWave *a1)
{
float v2; // s0
unsigned __int8 v3; // w3
float m_radius; // s0
char *v5; // x1
if ( a1->m_blendAdditive )
{
cocos2d::ccGLBlendFunc((unsigned int)&elf_hash_bucket[66] + 2, 1u);
if ( a1->m_circleMode == Filled )
goto LABEL_3;
}
else if ( a1->m_circleMode == Filled )
{
goto LABEL_3;
}
glLineWidth();
LABEL_3:
v2 = a1->m_opacity * a1->m_opacityMod;
if ( v2 <= 0.0 )
{
v3 = 0;
}
else if ( v2 < 255.0 )
{
v3 = (unsigned int)v2;
}
else
{
v3 = -1;
}
cocos2d::ccDrawColor4B(a1->m_color.r, a1->m_color.g, a1->m_color.b, v3);
m_radius = a1->m_radius;
LODWORD(v5) = 10;
if ( m_radius >= 10.0 )
{
v5 = &byte_9[6];
if ( m_radius >= 20.0 )
{
LODWORD(v5) = 20;
if ( m_radius >= 40.0 )
{
if ( m_radius >= 200.0 )
LODWORD(v5) = 50;
else
LODWORD(v5) = 30;
}
}
}
if ( a1->m_circleMode == Filled )
{
cocos2d::ccDrawFilledCircle(&a1->m_position, m_radius, 0.0, (unsigned int)v5);
if ( !a1->m_blendAdditive )
return;
LABEL_12:
cocos2d::ccGLBlendFunc((unsigned int)&dword_0 + 1, 0x303u);
return;
}
cocos2d::ccDrawCircle(&a1->m_position, m_radius, 0.0, (unsigned int)v5, 0);
if ( a1->m_blendAdditive )
goto LABEL_12;
}