//
// cocos2d::CCProgressTimer::updateBar from 0xaf85dc to 0xaf8b50 (1396 bytes)
//
// 2 xrefs:
// > cocos2d::CCProgressTimer::updateProgress @ 0xaf90d8
// > ??> @ 0x54570
//
// 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::updateBar(cocos2d::CCProgressTimer *a1)
{
float x; // s0
float v3; // s0
float y; // s0
float v5; // s0
cocos2d::ccV2F_C4B_T2F *m_pVertexData; // x1
cocos2d::ccV2F_C4B_T2F *v7; // x22
cocos2d::ccV2F_C4B_T2F *v8; // x23
float v9; // s0
cocos2d::ccV2F_C4B_T2F *v10; // x22
float v11; // s0
cocos2d::ccV2F_C4B_T2F *v12; // x23
float v13; // s0
cocos2d::ccV2F_C4B_T2F *v14; // x22
float v15; // s0
cocos2d::ccV2F_C4B_T2F *v16; // x23
float v17; // s0
cocos2d::ccV2F_C4B_T2F *v18; // x22
float v19; // s0
cocos2d::ccV2F_C4B_T2F *v20; // x23
float v21; // s0
cocos2d::ccV2F_C4B_T2F *v22; // x22
cocos2d::ccV2F_C4B_T2F *v23; // x23
float v24; // s0
cocos2d::ccV2F_C4B_T2F *v25; // x22
float v26; // s0
cocos2d::ccV2F_C4B_T2F *v27; // x23
float v28; // s0
cocos2d::ccV2F_C4B_T2F *v29; // x22
float v30; // s0
cocos2d::ccV2F_C4B_T2F *v31; // x23
float v32; // s0
cocos2d::ccV2F_C4B_T2F *v33; // x22
float v34; // s0
cocos2d::ccV2F_C4B_T2F *v35; // x23
float v36; // s0
cocos2d::ccV2F_C4B_T2F *v37; // x22
cocos2d::ccV2F_C4B_T2F *v38; // x23
cocos2d::ccV2F_C4B_T2F *v39; // x22
cocos2d::ccV2F_C4B_T2F *v40; // x23
cocos2d::ccV2F_C4B_T2F *v41; // x22
cocos2d::ccV2F_C4B_T2F *v42; // x23
cocos2d::ccV2F_C4B_T2F *v43; // x22
cocos2d::ccV2F_C4B_T2F *v44; // x23
cocos2d::CCPoint v45; // [xsp+48h] [xbp+48h] BYREF
cocos2d::CCPoint v46; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCPoint v47; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCPoint v48; // [xsp+60h] [xbp+60h] BYREF
cocos2d::ccTex2F v49; // 0:kr00_8.8
cocos2d::ccVertex2F v50; // 0:kr08_8.8
cocos2d::ccTex2F v51; // 0:kr10_8.8
cocos2d::ccVertex2F v52; // 0:kr18_8.8
cocos2d::ccTex2F v53; // 0:kr20_8.8
cocos2d::ccVertex2F v54; // 0:kr28_8.8
cocos2d::ccTex2F v55; // 0:kr30_8.8
cocos2d::ccTex2F v56; // 0:kr40_8.8
cocos2d::ccVertex2F v57; // 0:kr48_8.8
cocos2d::ccTex2F v58; // 0:kr50_8.8
cocos2d::ccVertex2F v59; // 0:kr58_8.8
cocos2d::ccTex2F v60; // 0:kr60_8.8
cocos2d::ccVertex2F v61; // 0:kr68_8.8
cocos2d::ccTex2F v62; // 0:kr70_8.8
cocos2d::ccTex2F v63; // 0:kr80_8.8
cocos2d::ccVertex2F v64; // 0:kr88_8.8
cocos2d::ccTex2F v65; // 0:kr90_8.8
cocos2d::ccVertex2F v66; // 0:kr98_8.8
cocos2d::ccTex2F v67; // 0:krA0_8.8
cocos2d::ccVertex2F v68; // 0:krA8_8.8
cocos2d::ccTex2F v69; // 0:krB0_8.8
cocos2d::ccVertex2F v70; // 0:krB8_8.8
cocos2d::CCPoint v71; // 0:s0.4,4:s1.4
cocos2d::CCPoint v72; // 0:s0.4,4:s1.4
cocos2d::CCPoint v73; // 0:s0.4,4:s1.4
cocos2d::CCPoint v74; // 0:s0.4,4:s1.4
cocos2d::CCPoint v75; // 0:s0.4,4:s1.4
cocos2d::CCPoint v76; // 0:s0.4,4:s1.4
cocos2d::CCPoint v77; // 0:s0.4,4:s1.4
cocos2d::CCPoint v78; // 0:s0.4,4:s1.4
cocos2d::CCPoint v79; // 0:s0.4,4:s1.4
cocos2d::CCPoint v80; // 0:s0.4,4:s1.4
cocos2d::CCPoint v81; // 0:s0.4,4:s1.4
cocos2d::CCPoint v82; // 0:s0.4,4:s1.4
cocos2d::CCPoint v83; // 0:s0.4,4:s1.4
cocos2d::CCPoint v84; // 0:s0.4,4:s1.4
cocos2d::CCPoint v85; // 0:s0.4,4:s1.4
cocos2d::CCPoint v86; // 0:s0.4,4:s1.4
cocos2d::CCPoint v87; // 0:s0.4,4:s1.4
cocos2d::CCPoint v88; // 0:s0.4,4:s1.4
cocos2d::CCPoint v89; // 0:s0.4,4:s1.4
cocos2d::CCPoint v90; // 0:s0.4,4:s1.4
cocos2d::CCPoint v91; // 0:s0.4,4:s1.4
cocos2d::CCPoint v92; // 0:s0.4,4:s1.4
cocos2d::CCPoint v93; // 0:s0.4,4:s1.4
cocos2d::CCPoint v94; // 0:s0.4,4:s1.4
if ( a1->m_pSprite )
{
cocos2d::CCPoint::CCPoint(
&v48,
(float)(1.0 - a1->m_tBarChangeRate.x) + (float)((float)(a1->m_fPercentage / 100.0) * a1->m_tBarChangeRate.x),
(float)(1.0 - a1->m_tBarChangeRate.y) + (float)((float)(a1->m_fPercentage / 100.0) * a1->m_tBarChangeRate.y));
cocos2d::CCPoint::operator*((float *)&v48, &v45, 0.5);
cocos2d::CCPoint::operator-((float *)&a1->m_tMidpoint, (float *)&v45, &v46);
cocos2d::CCPoint::operator+((float *)&a1->m_tMidpoint, (float *)&v45, &v47);
x = v46.x;
if ( v46.x < 0.0 )
{
v46.x = 0.0;
v3 = v47.x - x;
v47.x = v3;
}
else
{
v3 = v47.x;
}
if ( v3 > 1.0 )
{
v47.x = 1.0;
v46.x = v46.x - (float)(v3 - 1.0);
}
y = v46.y;
if ( v46.y < 0.0 )
{
v46.y = 0.0;
v5 = v47.y - y;
v47.y = v5;
}
else
{
v5 = v47.y;
}
if ( v5 > 1.0 )
{
v47.y = 1.0;
v46.y = v46.y - (float)(v5 - 1.0);
}
if ( a1->m_bReverseDirection )
{
m_pVertexData = a1->m_pVertexData;
if ( !m_pVertexData )
{
a1->m_nVertexDataCount = 8;
v37 = (cocos2d::ccV2F_C4B_T2F *)malloc(0xA0u);
a1->m_pVertexData = v37;
cocos2d::CCPoint::CCPoint(&v48, 0.0, 1.0);
v63 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v87);
v38 = a1->m_pVertexData;
v37->texCoords = v63;
cocos2d::CCPoint::CCPoint(&v48, 0.0, 1.0);
v64 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v88);
v39 = a1->m_pVertexData;
v38->vertices = v64;
cocos2d::CCPoint::CCPoint(&v48, 0.0, 0.0);
v65 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v89);
v40 = a1->m_pVertexData;
v39[1].texCoords = v65;
cocos2d::CCPoint::CCPoint(&v48, 0.0, 0.0);
v66 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v90);
v41 = a1->m_pVertexData;
v40[1].vertices = v66;
cocos2d::CCPoint::CCPoint(&v48, 1.0, 1.0);
v67 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v91);
v42 = a1->m_pVertexData;
v41[6].texCoords = v67;
cocos2d::CCPoint::CCPoint(&v48, 1.0, 1.0);
v68 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v92);
v43 = a1->m_pVertexData;
v42[6].vertices = v68;
cocos2d::CCPoint::CCPoint(&v48, 1.0, 0.0);
v69 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v93);
v44 = a1->m_pVertexData;
v43[7].texCoords = v69;
cocos2d::CCPoint::CCPoint(&v48, 1.0, 0.0);
v70 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v94);
m_pVertexData = a1->m_pVertexData;
v44[7].vertices = v70;
}
v7 = m_pVertexData + 2;
cocos2d::CCPoint::CCPoint(&v48, v46.x, v47.y);
v49 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v71);
v8 = a1->m_pVertexData;
v7->texCoords.u = v49.u;
v9 = v46.x;
v7->texCoords.v = v49.v;
cocos2d::CCPoint::CCPoint(&v48, v9, v47.y);
v50 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v72);
v10 = a1->m_pVertexData;
v8[2].vertices.x = v50.x;
v11 = v46.x;
v8[2].vertices.y = v50.y;
cocos2d::CCPoint::CCPoint(&v48, v11, v46.y);
v51 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v73);
v12 = a1->m_pVertexData;
v10[3].texCoords.u = v51.u;
v13 = v46.x;
v10[3].texCoords.v = v51.v;
cocos2d::CCPoint::CCPoint(&v48, v13, v46.y);
v52 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v74);
v14 = a1->m_pVertexData;
v12[3].vertices.x = v52.x;
v15 = v47.x;
v12[3].vertices.y = v52.y;
cocos2d::CCPoint::CCPoint(&v48, v15, v47.y);
v53 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v75);
v16 = a1->m_pVertexData;
v14[4].texCoords.u = v53.u;
v17 = v47.x;
v14[4].texCoords.v = v53.v;
cocos2d::CCPoint::CCPoint(&v48, v17, v47.y);
v54 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v76);
v18 = a1->m_pVertexData;
v16[4].vertices.x = v54.x;
v19 = v47.x;
v18 += 5;
v16[4].vertices.y = v54.y;
cocos2d::CCPoint::CCPoint(&v48, v19, v46.y);
v55 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v77);
v20 = a1->m_pVertexData;
v18->texCoords.u = v55.u;
v21 = v47.x;
v18->texCoords.v = v55.v;
cocos2d::CCPoint::CCPoint(&v48, v21, v46.y);
v20[5].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v78);
}
else
{
v22 = a1->m_pVertexData;
if ( !v22 )
{
a1->m_nVertexDataCount = 4;
v22 = (cocos2d::ccV2F_C4B_T2F *)malloc(0x50u);
a1->m_pVertexData = v22;
}
cocos2d::CCPoint::CCPoint(&v48, v46.x, v47.y);
v56 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v79);
v23 = a1->m_pVertexData;
v22->texCoords.u = v56.u;
v24 = v46.x;
v22->texCoords.v = v56.v;
cocos2d::CCPoint::CCPoint(&v48, v24, v47.y);
v57 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v80);
v25 = a1->m_pVertexData;
v23->vertices.x = v57.x;
v26 = v46.x;
v23->vertices.y = v57.y;
cocos2d::CCPoint::CCPoint(&v48, v26, v46.y);
v58 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v81);
v27 = a1->m_pVertexData;
v25[1].texCoords.u = v58.u;
v28 = v46.x;
v25[1].texCoords.v = v58.v;
cocos2d::CCPoint::CCPoint(&v48, v28, v46.y);
v59 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v82);
v29 = a1->m_pVertexData;
v27[1].vertices.x = v59.x;
v30 = v47.x;
v27[1].vertices.y = v59.y;
cocos2d::CCPoint::CCPoint(&v48, v30, v47.y);
v60 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v83);
v31 = a1->m_pVertexData;
v29[2].texCoords.u = v60.u;
v32 = v47.x;
v29[2].texCoords.v = v60.v;
cocos2d::CCPoint::CCPoint(&v48, v32, v47.y);
v61 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v84);
v33 = a1->m_pVertexData;
v31[2].vertices.x = v61.x;
v34 = v47.x;
v31[2].vertices.y = v61.y;
cocos2d::CCPoint::CCPoint(&v48, v34, v46.y);
v62 = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v85);
v35 = a1->m_pVertexData;
v33[3].texCoords.u = v62.u;
v36 = v47.x;
v33[3].texCoords.v = v62.v;
cocos2d::CCPoint::CCPoint(&v48, v36, v46.y);
v35[3].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v86);
}
cocos2d::CCProgressTimer::updateColor(a1);
}
}