//
// cocos2d::ccDrawCircleSegment from 0x1002e994c to 0x1002e9ad8 (396 bytes)
//
// 3 xrefs:
// > ParticlePreviewLayer::draw @ 0x100370a58
// > ParticlePreviewLayer::draw @ 0x100370ae8
// > ParticlePreviewLayer::draw @ 0x100370b28
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:02:52 +0000
//
void __fastcall cocos2d::ccDrawCircleSegment(
float *a1,
unsigned int a2,
int a3,
float a4,
float a5,
float a6,
float a7,
float a8)
{
unsigned int v16; // w23
int v17; // w22
float *v18; // x0
float *v19; // x20
__int64 v20; // x24
float v21; // s14
float v22; // s12
float v23; // s13
__int64 v24; // x21
__float2 v25; // 0:kr00_8.8
if ( *(float *)&dword_1009D420C > 0.0 )
{
cocos2d::ccDrawInit();
v16 = 1;
v17 = a3 ? 2 : 1;
v18 = (float *)calloc(8LL * (a2 + 2), 1u);
if ( v18 )
{
v19 = v18;
v20 = 0;
v21 = a6 / (float)a2;
v23 = *a1;
v22 = a1[1];
if ( a2 + 1 > 1 )
v24 = a2 + 1;
else
v24 = 1;
do
{
v25 = __sincosf_stret((float)(v21 * (float)(unsigned int)v20) + a5);
v19[v16 - 1] = v23 + (float)((float)(v25.__cosval * a4) * a7);
v19[v16] = v22 + (float)((float)(v25.__sinval * a4) * a8);
++v20;
v16 += 2;
}
while ( v24 != v20 );
v19[2 * a2 + 2] = v23;
v19[2 * a2 + 3] = v22;
cocos2d::CCGLProgram::use(qword_1009F6230);
cocos2d::CCGLProgram::setUniformsForBuiltins(qword_1009F6230);
cocos2d::CCGLProgram::setUniformLocationWith4fv(qword_1009F6230, dword_1009D41F0, flt_1009D4200, 1);
cocos2d::ccGLEnableVertexAttribs(1);
glVertexAttribPointer(0, 2, 0x1406u, 0, 0, v19);
glDrawArrays(3u, 0, v17 + a2);
free(v19);
++dword_100A0F904;
}
}
}