//
// cocos2d::ccDrawCircleSegment from 0x10024c708 to 0x10024c894 (396 bytes)
//
// 3 xrefs:
// > ParticlePreviewLayer::draw @ 0x1002d18d4
// > ParticlePreviewLayer::draw @ 0x1002d1964
// > ParticlePreviewLayer::draw @ 0x1002d19a4
//
// 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 __fastcall cocos2d::ccDrawCircleSegment(
const cocos2d::CCPoint *a1,
float a2,
float a3,
float a4,
unsigned int a5,
bool a6,
float a7,
float a8)
{
_BOOL4 v11; // w20
unsigned int v16; // w23
int v17; // w22
float *v18; // x0
float *v19; // x20
__int64 v20; // x24
float v21; // s14
float y; // s12
float x; // s13
__int64 v24; // x21
__float2 v25; // 0:kr00_8.8
if ( *(float *)&dword_10084C15C > 0.0 )
{
v11 = a6;
cocos2d::ccDrawInit();
v16 = 1;
v17 = v11 ? 2 : 1;
v18 = (float *)calloc(8LL * (a5 + 2), 1u);
if ( v18 )
{
v19 = v18;
v20 = 0;
v21 = a4 / (float)a5;
x = a1->x;
y = a1->y;
if ( a5 + 1 > 1 )
v24 = a5 + 1;
else
v24 = 1;
do
{
v25 = __sincosf_stret((float)(v21 * (float)(unsigned int)v20) + a3);
v19[v16 - 1] = x + (float)((float)(v25.__cosval * a2) * a7);
v19[v16] = y + (float)((float)(v25.__sinval * a2) * a8);
++v20;
v16 += 2;
}
while ( v24 != v20 );
v19[2 * a5 + 2] = x;
v19[2 * a5 + 3] = y;
cocos2d::CCGLProgram::use((cocos2d::CCGLProgram *)qword_10086D370);
cocos2d::CCGLProgram::setUniformsForBuiltins((cocos2d::CCGLProgram *)qword_10086D370);
cocos2d::CCGLProgram::setUniformLocationWith4fv(
(cocos2d::CCGLProgram *)qword_10086D370,
dword_10084C140,
flt_10084C150,
1u);
cocos2d::ccGLEnableVertexAttribs(1u);
glVertexAttribPointer(0, 2, 0x1406u, 0, 0, v19);
glDrawArrays(3u, 0, v17 + a5);
free(v19);
++dword_100885D50;
}
}
}