//
// cocos2d::CCProgressTimer::updateRadial from 0x5d79d8 to 0x5d7d50 (888 bytes)
//
// 1 xrefs:
// > cocos2d::CCProgressTimer::updateProgress @ 0x5d7d74
//
// 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::CCProgressTimer::updateRadial(cocos2d::CCProgressTimer *a1)
{
float v2; // s17
float v3; // s16
int v4; // r2
bool v5; // r3
int v6; // r11
float x; // s17
int v8; // r5
int v9; // r2
bool v10; // r3
cocos2d::CCPoint *v11; // r0
int v12; // r2
bool v13; // r3
int v14; // r5
cocos2d::ccV2F_C4B_T2F *m_pVertexData; // r0
int v16; // r6
cocos2d::ccV2F_C4B_T2F *v17; // r5
cocos2d::CCPoint v18; // r2
GLfloat v19; // r1
cocos2d::ccTex2F *p_texCoords; // r3
cocos2d::ccV2F_C4B_T2F *v21; // r5
int m_nVertexDataCount; // r6
cocos2d::CCPoint v23; // r2
cocos2d::ccV2F_C4B_T2F *v24; // r5
GLfloat v25; // r1
cocos2d::CCPoint v26; // r2
GLfloat v; // r1
cocos2d::CCPoint v28; // r2
GLfloat y; // r1
cocos2d::CCPoint v30; // r2
GLfloat v31; // r1
cocos2d::ccV2F_C4B_T2F *v32; // r7
cocos2d::CCPoint v33; // r2
GLfloat v34; // r1
int v35; // r8
cocos2d::ccV2F_C4B_T2F *v36; // r9
cocos2d::CCPoint v37; // r2
GLfloat v38; // r1
cocos2d::ccV2F_C4B_T2F *v39; // r8
cocos2d::CCPoint v40; // r2
GLfloat v41; // r1
cocos2d::CCPoint *v42; // [sp+Ch] [bp-58h]
cocos2d::CCPoint *v43; // [sp+Ch] [bp-58h]
cocos2d::CCPoint *v44; // [sp+Ch] [bp-58h]
cocos2d::ccVertex2F v45; // [sp+18h] [bp-4Ch] BYREF
cocos2d::ccTex2F v46; // [sp+20h] [bp-44h] BYREF
float v47; // [sp+28h] [bp-3Ch] BYREF
cocos2d::CCPoint v48; // [sp+2Ch] [bp-38h] BYREF
cocos2d::CCPoint v49; // [sp+34h] [bp-30h] BYREF
cocos2d::CCPoint v50; // [sp+3Ch] [bp-28h] BYREF
cocos2d::CCPoint v51; // [sp+44h] [bp-20h] BYREF
cocos2d::CCPoint v52; // [sp+4Ch] [bp-18h] BYREF
cocos2d::CCPoint v53; // [sp+54h] [bp-10h] BYREF
if ( !a1->m_pSprite )
return;
v2 = a1->m_fPercentage / 100.0;
if ( a1->m_bReverseDirection )
v3 = v2 * 6.2832;
else
v3 = (float)(1.0 - v2) * 6.2832;
cocos2d::CCPoint::CCPoint(&v48, a1->m_tMidpoint.x, 1.0);
cocos2d::ccpRotateByAngle(&v49, &v48, &a1->m_tMidpoint, v3);
cocos2d::CCPoint::CCPoint(&v50, &stru_AC8D8C);
if ( v2 == 0.0 )
{
cocos2d::CCPoint::operator=(&v50, &v48.x, v4, v5);
v6 = 0;
goto LABEL_24;
}
if ( v2 == 1.0 )
{
cocos2d::CCPoint::operator=(&v50, &v48.x, v4, v5);
v6 = 4;
goto LABEL_24;
}
x = 3.4028e38;
v8 = 0;
v6 = 0;
do
{
cocos2d::CCProgressTimer::boundaryTexCoord(&v51, a1, v8 & 3);
cocos2d::CCProgressTimer::boundaryTexCoord(&v52, a1, (v8 + 3) & 3);
if ( v8 )
{
if ( v8 != 4 )
goto LABEL_15;
cocos2d::ccpLerp(&v53, &v51, &v52, 1.0 - a1->m_tMidpoint.x);
v11 = &v51;
}
else
{
cocos2d::ccpLerp(&v53, &v51, &v52, 1.0 - a1->m_tMidpoint.x);
v11 = &v52;
}
cocos2d::CCPoint::operator=(v11, &v53.x, v9, v10);
LABEL_15:
v47 = 0.0;
v53.x = 0.0;
if ( cocos2d::ccpLineIntersect(&v51, &v52, &a1->m_tMidpoint, &v49, &v47, &v53.x)
&& ((v8 & 0xFFFFFFFB) != 0 || v47 >= 0.0 && v47 <= 1.0)
&& v53.x >= 0.0
&& v53.x < x )
{
x = v53.x;
v6 = v8;
}
++v8;
}
while ( v8 != 5 );
cocos2d::CCPoint::operator-(&v51, &v49.x, &a1->m_tMidpoint.x);
cocos2d::CCPoint::operator*(&v52, &v51.x, x);
cocos2d::CCPoint::operator+(&v53, &a1->m_tMidpoint.x, &v52.x);
cocos2d::CCPoint::operator=(&v50, &v53.x, v12, v13);
LABEL_24:
v14 = v6 + 3;
if ( a1->m_nVertexDataCount == v6 + 3 )
{
v16 = 1;
}
else
{
m_pVertexData = a1->m_pVertexData;
if ( m_pVertexData )
{
free(m_pVertexData);
a1->m_pVertexData = nullptr;
}
v16 = 0;
a1->m_nVertexDataCount = 0;
}
if ( !a1->m_pVertexData )
{
a1->m_nVertexDataCount = v14;
a1->m_pVertexData = (cocos2d::ccV2F_C4B_T2F *)malloc(20 * v14);
}
cocos2d::CCProgressTimer::updateColor(a1);
if ( !v16 )
{
v42 = (cocos2d::CCPoint *)a1->m_pVertexData;
cocos2d::CCPoint::CCPoint(&v53, &a1->m_tMidpoint);
LODWORD(v26.x) = &v53;
cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(&v46, a1, v26);
v = v46.v;
v42[1].y = v46.u;
v42[2].x = v;
v43 = (cocos2d::CCPoint *)a1->m_pVertexData;
cocos2d::CCPoint::CCPoint(&v53, &a1->m_tMidpoint);
LODWORD(v28.x) = &v53;
cocos2d::CCProgressTimer::vertexFromAlphaPoint(&v45, a1, v28);
y = v45.y;
v43->x = v45.x;
v43->y = y;
v44 = (cocos2d::CCPoint *)a1->m_pVertexData;
cocos2d::CCPoint::CCPoint(&v53, &v48);
LODWORD(v30.x) = &v53;
cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(&v46, a1, v30);
v31 = v46.v;
v32 = a1->m_pVertexData;
v44[4].x = v46.u;
v44[4].y = v31;
++v32;
cocos2d::CCPoint::CCPoint(&v53, &v48);
LODWORD(v33.x) = &v53;
cocos2d::CCProgressTimer::vertexFromAlphaPoint(&v45, a1, v33);
v34 = v45.y;
v32->vertices.x = v45.x;
v32->vertices.y = v34;
while ( v16 != v6 )
{
cocos2d::CCProgressTimer::boundaryTexCoord(&v52, a1, v16);
v35 = v16++;
v35 += 2;
v36 = &a1->m_pVertexData[v35];
cocos2d::CCPoint::CCPoint(&v53, &v52);
LODWORD(v37.x) = &v53;
v36 = (cocos2d::ccV2F_C4B_T2F *)((char *)v36 + 12);
cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(&v46, a1, v37);
v38 = v46.v;
v39 = &a1->m_pVertexData[v35];
v36->vertices.x = v46.u;
v36->vertices.y = v38;
cocos2d::CCPoint::CCPoint(&v53, &v52);
LODWORD(v40.x) = &v53;
cocos2d::CCProgressTimer::vertexFromAlphaPoint(&v45, a1, v40);
v41 = v45.y;
v39->vertices.x = v45.x;
v39->vertices.y = v41;
}
}
v17 = &a1->m_pVertexData[a1->m_nVertexDataCount - 1];
cocos2d::CCPoint::CCPoint(&v53, &v50);
LODWORD(v18.x) = &v53;
cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(&v46, a1, v18);
v19 = v46.v;
p_texCoords = &v17->texCoords;
v21 = a1->m_pVertexData;
p_texCoords->u = v46.u;
p_texCoords->v = v19;
m_nVertexDataCount = a1->m_nVertexDataCount;
cocos2d::CCPoint::CCPoint(&v53, &v50);
LODWORD(v23.x) = &v53;
v24 = &v21[m_nVertexDataCount - 1];
cocos2d::CCProgressTimer::vertexFromAlphaPoint(&v45, a1, v23);
v25 = v45.y;
v24->vertices.x = v45.x;
v24->vertices.y = v25;
}