//
// cocos2d::CCProgressTimer::updateBar from 0x1003fde28 to 0x1003fe2e0 (1208 bytes)
//
// 1 xrefs:
// > cocos2d::CCProgressTimer::updateProgress @ 0x1003fd820
//
// 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::CCProgressTimer::updateBar(cocos2d::CCProgressTimer *a1)
{
__n128 v1; // q0
__n128 v2; // q1
__int32 v4; // s9
__n128 v5; // q1
float v6; // s8
__n128 v7; // q0
float v8; // s1
float v9; // s0
cocos2d::ccV2F_C4B_T2F *m_pVertexData; // x8
__n128 v11; // q0
__n128 v12; // q1
__n128 v13; // q0
__n128 v14; // q1
__n128 v15; // q0
__n128 v16; // q1
__n128 v17; // q0
__n128 v18; // q1
__n128 v19; // q0
__n128 v20; // q1
__n128 v21; // q0
__n128 v22; // q1
__n128 v23; // q0
__n128 v24; // q1
__n128 v25; // q0
__n128 v26; // q1
__n128 v27; // q0
__n128 v28; // q1
__n128 v29; // q0
__n128 v30; // q1
__n128 v31; // q0
__n128 v32; // q1
__n128 v33; // q0
__n128 v34; // q1
__n128 v35; // q0
__n128 v36; // q1
__n128 v37; // q0
__n128 v38; // q1
__n128 v39; // q0
__n128 v40; // q1
__int64 v41; // x8
__int64 v42; // x9
__n128 v43; // q0
__n128 v44; // q1
__n128 v45; // q0
__n128 v46; // q1
__n128 v47; // q0
__n128 v48; // q1
__n128 v49; // q0
__n128 v50; // q1
__n128 v51; // q0
__n128 v52; // q1
__n128 v53; // q0
__n128 v54; // q1
__n128 v55; // q0
__n128 v56; // q1
cocos2d::ccV2F_C4B_T2F *v57; // x10
GLfloat x; // s0
GLfloat y; // s1
int v60; // [xsp+0h] [xbp-40h] BYREF
float32x2_t v61; // [xsp+8h] [xbp-38h] BYREF
float32x2_t v62; // [xsp+10h] [xbp-30h] BYREF
float32x2_t v63; // [xsp+18h] [xbp-28h] BYREF
cocos2d::ccVertex2F v64; // 0:kr78_8.8
cocos2d::ccVertex2F v65; // 0:krB8_8.8
cocos2d::CCPoint v66; // 0:s0.4,4:s1.4
cocos2d::CCPoint v67; // 0:s0.4,4:s1.4
cocos2d::CCPoint v68; // 0:s0.4,4:s1.4
cocos2d::CCPoint v69; // 0:s0.4,4:s1.4
cocos2d::CCPoint v70; // 0:s0.4,4:s1.4
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
if ( a1->m_pSprite )
{
v2.n128_f32[0] = a1->m_fPercentage / 100.0;
v4 = 1.0;
v1.n128_f32[0] = (float)(1.0 - a1->m_tBarChangeRate.x) + (float)(v2.n128_f32[0] * a1->m_tBarChangeRate.x);
v2.n128_f32[0] = (float)(1.0 - a1->m_tBarChangeRate.y) + (float)(v2.n128_f32[0] * a1->m_tBarChangeRate.y);
sub_100022980(v1, v2, &v62);
sub_100022A14(&v62, &v63, 0.5);
sub_1000229F0((float32x2_t *)&a1->m_tMidpoint, &v63, &v62);
v7.n128_f32[1] = sub_1000229DC((float32x2_t *)&a1->m_tMidpoint, &v63, &v61).f32[1];
v6 = v62.f32[0];
v7.n128_u32[0] = v61.i32[0];
if ( v62.f32[0] < 0.0 )
{
v7.n128_f32[0] = v61.f32[0] - v62.f32[0];
v61.f32[0] = v61.f32[0] - v62.f32[0];
v62.i32[0] = 0;
v6 = 0.0;
}
if ( v7.n128_f32[0] > 1.0 )
{
v6 = v6 - (float)(v7.n128_f32[0] + -1.0);
v62.f32[0] = v6;
v61.i32[0] = 1065353216;
}
v8 = v62.f32[1];
v9 = v61.f32[1];
if ( v62.f32[1] < 0.0 )
{
v9 = v61.f32[1] - v62.f32[1];
v61.f32[1] = v61.f32[1] - v62.f32[1];
v62.i32[1] = 0;
v8 = 0.0;
}
if ( v9 <= 1.0 )
{
v4 = LODWORD(v9);
}
else
{
v62.f32[1] = v8 - (float)(v9 + -1.0);
v61.i32[1] = 1065353216;
}
m_pVertexData = a1->m_pVertexData;
if ( a1->m_bReverseDirection )
{
if ( !m_pVertexData )
{
a1->m_nVertexDataCount = 8;
a1->m_pVertexData = (cocos2d::ccV2F_C4B_T2F *)malloc(0xA0u);
v11.n128_u32[0] = 0;
v12.n128_u32[0] = 1.0;
sub_100022980(v11, v12, &v60);
a1->m_pVertexData->texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v66);
v13.n128_u32[0] = 0;
v14.n128_u32[0] = 1.0;
sub_100022980(v13, v14, &v60);
a1->m_pVertexData->vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v67);
v15.n128_u32[0] = 0;
v16.n128_u32[0] = 0;
sub_100022980(v15, v16, &v60);
a1->m_pVertexData[1].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v68);
v17.n128_u32[0] = 0;
v18.n128_u32[0] = 0;
sub_100022980(v17, v18, &v60);
a1->m_pVertexData[1].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v69);
v19.n128_u32[0] = 1.0;
v20.n128_u32[0] = 1.0;
sub_100022980(v19, v20, &v60);
a1->m_pVertexData[6].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v70);
v21.n128_u32[0] = 1.0;
v22.n128_u32[0] = 1.0;
sub_100022980(v21, v22, &v60);
a1->m_pVertexData[6].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v71);
v23.n128_u32[0] = 1.0;
v24.n128_u32[0] = 0;
sub_100022980(v23, v24, &v60);
a1->m_pVertexData[7].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v72);
v25.n128_u32[0] = 1.0;
v26.n128_u32[0] = 0;
sub_100022980(v25, v26, &v60);
a1->m_pVertexData[7].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v73);
v4 = v61.i32[1];
v6 = v62.f32[0];
}
v7.n128_f32[0] = v6;
v5.n128_u32[0] = v4;
sub_100022980(v7, v5, &v60);
a1->m_pVertexData[2].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v74);
v28.n128_u32[0] = v61.u32[1];
v27.n128_u32[0] = v62.i32[0];
sub_100022980(v27, v28, &v60);
a1->m_pVertexData[2].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v75);
v30.n128_u32[0] = v62.u32[1];
v29.n128_u32[0] = v62.i32[0];
sub_100022980(v29, v30, &v60);
a1->m_pVertexData[3].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v76);
v32.n128_u32[0] = v62.u32[1];
v31.n128_u32[0] = v62.i32[0];
sub_100022980(v31, v32, &v60);
a1->m_pVertexData[3].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v77);
v34.n128_u32[0] = v61.u32[1];
v33.n128_u32[0] = v61.i32[0];
sub_100022980(v33, v34, &v60);
a1->m_pVertexData[4].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v78);
v36.n128_u32[0] = v61.u32[1];
v35.n128_u32[0] = v61.i32[0];
sub_100022980(v35, v36, &v60);
a1->m_pVertexData[4].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v79);
v37.n128_u32[0] = v61.i32[0];
v38.n128_u32[0] = v62.u32[1];
sub_100022980(v37, v38, &v60);
a1->m_pVertexData[5].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v80);
v39.n128_u32[0] = v61.i32[0];
v40.n128_u32[0] = v62.u32[1];
sub_100022980(v39, v40, &v60);
v64 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v81);
x = v64.x;
y = v64.y;
v41 = 104;
v42 = 5;
}
else
{
if ( !m_pVertexData )
{
a1->m_nVertexDataCount = 4;
a1->m_pVertexData = (cocos2d::ccV2F_C4B_T2F *)malloc(0x50u);
}
v7.n128_f32[0] = v6;
v5.n128_u32[0] = v4;
sub_100022980(v7, v5, &v60);
a1->m_pVertexData->texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v82);
v44.n128_u32[0] = v61.u32[1];
v43.n128_u32[0] = v62.i32[0];
sub_100022980(v43, v44, &v60);
a1->m_pVertexData->vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v83);
v46.n128_u32[0] = v62.u32[1];
v45.n128_u32[0] = v62.i32[0];
sub_100022980(v45, v46, &v60);
a1->m_pVertexData[1].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v84);
v48.n128_u32[0] = v62.u32[1];
v47.n128_u32[0] = v62.i32[0];
sub_100022980(v47, v48, &v60);
a1->m_pVertexData[1].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v85);
v50.n128_u32[0] = v61.u32[1];
v49.n128_u32[0] = v61.i32[0];
sub_100022980(v49, v50, &v60);
a1->m_pVertexData[2].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v86);
v52.n128_u32[0] = v61.u32[1];
v51.n128_u32[0] = v61.i32[0];
sub_100022980(v51, v52, &v60);
a1->m_pVertexData[2].vertices = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v87);
v53.n128_u32[0] = v61.i32[0];
v54.n128_u32[0] = v62.u32[1];
sub_100022980(v53, v54, &v60);
a1->m_pVertexData[3].texCoords = cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(a1, v88);
v55.n128_u32[0] = v61.i32[0];
v56.n128_u32[0] = v62.u32[1];
sub_100022980(v55, v56, &v60);
v65 = cocos2d::CCProgressTimer::vertexFromAlphaPoint(a1, v89);
x = v65.x;
y = v65.y;
v41 = 64;
v42 = 3;
}
v57 = a1->m_pVertexData;
v57[v42].vertices.x = x;
*(GLfloat *)((char *)&v57->vertices.x + v41) = y;
cocos2d::CCProgressTimer::updateColor(a1);
}
}