//
// cocos2d::ccDrawCircleSegment from 0x5c4520 to 0x5c4652 (306 bytes)
//
// 2 xrefs:
// > ParticlePreviewLayer::draw @ 0x52fa7c
// > ParticlePreviewLayer::draw @ 0x52fae4
//
// 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 cocos2d::ccDrawCircleSegment(
const cocos2d::CCPoint *a1,
float a2,
float a3,
float a4,
unsigned int a5,
bool a6,
float a7,
float a8)
{
int v12; // r7
float *v13; // r0
float v14; // s17
float *v15; // r5
float *v16; // r9
float x; // s19
float y; // s18
unsigned int v19; // r8
unsigned int v20; // s15
float v21; // s15
float v22; // s16
float v23; // r0
float *v24; // r4
if ( flt_ABAC34 > 0.0 )
{
cocos2d::ccDrawInit((cocos2d *)a1);
if ( a6 )
v12 = 2;
else
v12 = 1;
v13 = (float *)calloc(8 * (a5 + 2), 1u);
v14 = a4 / (float)a5;
v15 = v13;
if ( v13 )
{
v16 = v13 + 1;
x = a1->x;
y = a1->y;
v19 = 0;
do
{
v20 = v19++;
v21 = (float)v20;
v22 = cosf(a3 + (float)(v21 * v14));
v23 = sinf(a3 + (float)(v21 * v14));
*(v16 - 1) = x + (float)((float)(a2 * v22) * a7);
*v16 = y + (float)((float)(a2 * v23) * a8);
v16 += 2;
}
while ( v19 <= a5 );
v24 = &v15[2 * a5 + 4];
*(v24 - 2) = x;
*(v24 - 1) = y;
cocos2d::CCGLProgram::use((cocos2d::CCGLProgram *)dword_AC8A40);
cocos2d::CCGLProgram::setUniformsForBuiltins((cocos2d::CCGLProgram *)dword_AC8A40);
cocos2d::CCGLProgram::setUniformLocationWith4fv(
(cocos2d::CCGLProgram *)dword_AC8A40,
dword_ABAC20,
(float *)&dword_ABAC28,
1u);
cocos2d::ccGLEnableVertexAttribs((unsigned int)&dword_0 + 1);
glVertexAttribPointer();
glDrawArrays(3u, 0, a5 + v12);
free(v15);
++g_uNumberOfDraws;
}
}
}