// // cocos2d::CCProgressTimer::updateRadial from 0x18005eae0 to 0x18005f105 (1573 bytes) // // 8 xrefs: // > cocos2d::CCProgressTimer::initWithSprite @ 0x18005de55 // > cocos2d::CCProgressTimer::setPercentage @ 0x18005e0ca // > cocos2d::CCProgressTimer::updateProgress @ 0x18005ead4 // > @ 0x180139484 // > @ 0x1801394d0 // > @ 0x1801394e0 // > @ 0x1801438a8 // > @ 0x1801b32f4 // // 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::updateRadial(cocos2d::CCProgressTimer *this) { float v2; // xmm7_4 float v3; // xmm8_4 cocos2d::CCPoint *p_m_tMidpoint; // r15 int v5; // r14d int v6; // r13d struct cocos2d::CCPoint *v7; // rdx float v8; // xmm7_4 int i; // esi char v10; // di char v11; // r8 int v12; // eax char v13; // cl char v14; // dl int v15; // eax char v16; // cl _DWORD *v17; // rax struct cocos2d::CCPoint *v18; // rcx int m_nVertexDataCount; // r9d int v20; // edi char v21; // si cocos2d::ccV2F_C4B_T2F *m_pVertexData; // rcx cocos2d::ccV2F_C4B_T2F *v23; // rax cocos2d::CCSprite *m_pSprite; // rcx int v25; // edx __int64 v26; // r8 __int64 v27; // rcx float *v28; // rax GLfloat *v29; // rax cocos2d::ccV2F_C4B_T2F *v30; // rcx GLfloat v31; // xmm0_4 GLfloat *v32; // rax cocos2d::ccV2F_C4B_T2F *v33; // rcx GLfloat v34; // xmm0_4 float *v35; // rax GLfloat *v36; // rax cocos2d::ccV2F_C4B_T2F *v37; // rcx GLfloat v38; // xmm0_4 GLfloat *v39; // rax cocos2d::ccV2F_C4B_T2F *v40; // rcx GLfloat v41; // xmm0_4 __int64 v42; // rdi char v43; // dl int v44; // eax char v45; // cl float *v46; // rax GLfloat *v47; // rax cocos2d::ccV2F_C4B_T2F *v48; // rcx GLfloat v49; // xmm0_4 GLfloat *v50; // rax cocos2d::ccV2F_C4B_T2F *v51; // rcx GLfloat v52; // xmm0_4 float *v53; // rax GLfloat *v54; // rax GLfloat v55; // xmm0_4 __int64 v56; // rdx cocos2d::ccV2F_C4B_T2F *v57; // rcx GLfloat *v58; // rax GLfloat v59; // xmm0_4 __int64 v60; // rdx cocos2d::ccV2F_C4B_T2F *v61; // rcx float *v62; // [rsp+38h] [rbp-D0h] BYREF int v63; // [rsp+40h] [rbp-C8h] BYREF struct cocos2d::CCPoint v64; // [rsp+48h] [rbp-C0h] BYREF _BYTE v65[8]; // [rsp+50h] [rbp-B8h] BYREF __int64 v66; // [rsp+58h] [rbp-B0h] BYREF struct cocos2d::CCPoint v67; // [rsp+138h] [rbp+30h] BYREF float v68; // [rsp+140h] [rbp+38h] BYREF struct cocos2d::CCPoint v69; // [rsp+148h] [rbp+40h] BYREF struct cocos2d::CCPoint v70; // [rsp+150h] [rbp+48h] BYREF if ( !this->m_pSprite ) return; v2 = this->m_fPercentage / 100.0; if ( this->m_bReverseDirection ) v3 = this->m_fPercentage / 100.0; else v3 = 1.0 - v2; p_m_tMidpoint = &this->m_tMidpoint; kmVec2Fill((float *)&v62, this->m_tMidpoint.x, 1.0); cocos2d::ccpRotateByAngle((cocos2d *)&v64, (const struct cocos2d::CCPoint *)&v62, p_m_tMidpoint, v3 * 6.2831855); v5 = 0; v6 = 0; cocos2d::cc_timeval::operator=(&v63, dword_1801A83F8); if ( v2 == 0.0 ) { v7 = (struct cocos2d::CCPoint *)&v62; goto LABEL_33; } if ( v2 == 1.0 ) { cocos2d::CCSize::operator=(&v63, &v62); v6 = 4; goto LABEL_34; } v8 = 3.4028235e38; for ( i = 0; i <= 4; ++i ) { v10 = (i + 3) % 4; v11 = 2 * (i & 3); if ( this->m_bReverseDirection ) { v12 = 75 >> (7 - v11); v13 = 6 - v11; } else { v12 = 75 >> (2 * (i & 3) + 1); v13 = 2 * (i & 3); } kmVec2Fill((float *)&v70, (float)(v12 & 1), (float)((75 >> v13) & 1)); if ( v10 >= 4 ) { cocos2d::cc_timeval::operator=(&v69, dword_1801A83F8); } else { v14 = 2 * v10; if ( this->m_bReverseDirection ) { v15 = (75 >> (6 - v14)) & 1; v16 = 7 - v14; } else { v16 = 2 * v10 + 1; v15 = (75 >> v14) & 1; } kmVec2Fill((float *)&v69, (float)((75 >> v16) & 1), (float)v15); } if ( i ) { if ( i != 4 ) goto LABEL_24; v17 = (_DWORD *)cocos2d::ccpLerp((cocos2d *)v65, &v70, &v69, 1.0 - p_m_tMidpoint->x); v18 = &v70; } else { v17 = (_DWORD *)cocos2d::ccpLerp((cocos2d *)&v66, &v70, &v69, 1.0 - p_m_tMidpoint->x); v18 = &v69; } cocos2d::CCSize::operator=(v18, v17); LABEL_24: v67.x = 0.0; v68 = 0.0; if ( cocos2d::ccpLineIntersect((cocos2d *)&v70, &v69, p_m_tMidpoint, &v64, &v67, &v68, v62) && ((i & 0xFFFFFFFB) != 0 || v67.x >= 0.0 && v67.x <= 1.0) && v68 >= 0.0 && v8 > v68 ) { v8 = v68; v6 = i; } } cocos2d::CCSize::operator-((float *)&v64, (float *)&v67, (float *)p_m_tMidpoint); cocos2d::CCSize::operator*((float *)&v67, &v68, v8); cocos2d::CCSize::operator+((float *)p_m_tMidpoint, (float *)&v69, &v68); v7 = &v69; LABEL_33: cocos2d::CCSize::operator=(&v63, v7); LABEL_34: m_nVertexDataCount = this->m_nVertexDataCount; v20 = v6 + 3; v21 = 1; if ( m_nVertexDataCount != v6 + 3 ) { m_pVertexData = this->m_pVertexData; v21 = 0; if ( m_pVertexData ) { free(m_pVertexData); this->m_pVertexData = nullptr; } this->m_nVertexDataCount = 0; m_nVertexDataCount = 0; } v23 = this->m_pVertexData; if ( !v23 ) { this->m_nVertexDataCount = v20; v23 = (cocos2d::ccV2F_C4B_T2F *)malloc(20LL * v20); m_nVertexDataCount = this->m_nVertexDataCount; this->m_pVertexData = v23; } m_pSprite = this->m_pSprite; if ( m_pSprite ) { if ( v23 ) { v25 = 0; v26 = HIDWORD(*(_QWORD *)&m_pSprite->m_sQuad.tl.vertices.z); if ( m_nVertexDataCount > 0 ) { v27 = 0; do { ++v27; ++v25; this->m_pVertexData[v27 - 1].colors = (cocos2d::ccColor4B)v26; } while ( v25 < this->m_nVertexDataCount ); } } } if ( !v21 ) { v28 = (float *)cocos2d::cc_timeval::operator=(&v67, p_m_tMidpoint); v29 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)&v68, v28); v30 = this->m_pVertexData; v31 = v29[1]; v30->texCoords.u = *v29; v30->texCoords.v = v31; cocos2d::cc_timeval::operator=(&v67, p_m_tMidpoint); v32 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)&v68); v33 = this->m_pVertexData; v34 = v32[1]; v33->vertices.x = *v32; v33->vertices.y = v34; v35 = (float *)cocos2d::cc_timeval::operator=(&v67, &v62); v36 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)&v68, v35); v37 = this->m_pVertexData; v38 = v36[1]; v37[1].texCoords.u = *v36; v37[1].texCoords.v = v38; cocos2d::cc_timeval::operator=(&v67, &v62); v39 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)&v68); v40 = this->m_pVertexData; v41 = v39[1]; v40[1].vertices.x = *v39; v40[1].vertices.y = v41; if ( v6 > 0 ) { v42 = 2; do { if ( (char)v5 >= 4 ) { cocos2d::cc_timeval::operator=(&v67, dword_1801A83F8); } else { v43 = 2 * v5; if ( this->m_bReverseDirection ) { v44 = (75 >> (6 - v43)) & 1; v45 = 7 - v43; } else { v45 = 2 * v5 + 1; v44 = (75 >> v43) & 1; } kmVec2Fill((float *)&v67, (float)((75 >> v45) & 1), (float)v44); } v46 = (float *)cocos2d::cc_timeval::operator=(&v68, &v67); v47 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)&v69, v46); v48 = this->m_pVertexData; v49 = v47[1]; v48[v42].texCoords.u = *v47; v48[v42].texCoords.v = v49; cocos2d::cc_timeval::operator=(&v70, &v67); v50 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)v65); v51 = this->m_pVertexData; ++v5; v52 = v50[1]; v51[v42].vertices.x = *v50; v51[v42++].vertices.y = v52; } while ( v5 < v6 ); } } v53 = (float *)cocos2d::cc_timeval::operator=(&v67, &v63); v54 = (GLfloat *)cocos2d::CCProgressTimer::textureCoordFromAlphaPoint(this, (struct cocos2d::CCPoint)&v68, v53); v55 = v54[1]; v56 = this->m_nVertexDataCount; v57 = this->m_pVertexData; v57[v56 - 1].texCoords.u = *v54; v57[v56 - 1].texCoords.v = v55; cocos2d::cc_timeval::operator=(&v67, &v63); v58 = (GLfloat *)cocos2d::CCProgressTimer::vertexFromAlphaPoint(this, (struct cocos2d::CCPoint)&v68); v59 = v58[1]; v60 = this->m_nVertexDataCount; v61 = this->m_pVertexData; v61[v60 - 1].vertices.x = *v58; v61[v60 - 1].vertices.y = v59; }
GD Web Decomp Icon

GD Web Decomp

Raw Source