// // PlayLayer::updateProgressbar from 0x1403b23c0 to 0x1403b2560 (416 bytes) // // 5 xrefs: // > PlayLayer::setupHasCompleted @ 0x1403a7350 // > PlayLayer::toggleProgressbar @ 0x1403b28cb // > PlayLayer::postUpdate @ 0x1403b4be3 // > PlayLayer::resetLevel @ 0x1403b98c9 // > @ 0x1406d6e3c // // 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 // // Hidden C++ exception states: #wind=1 void PlayLayer::updateProgressbar(PlayLayer *a1) { float CurrentPercent; // xmm8_4 float m_progressWidth; // xmm3_4 float v4; // xmm6_4 float v5; // xmm1_4 cocos2d::CCSprite_vtbl *v6; // rbx const cocos2d::CCRect *v7; // rax cocos2d::CCLabelProtocol_vtbl *v8; // rbx cocos2d::CCString *v9; // rax const char *CString; // rax signed int v11; // edx const char *p_Src; // rdx cocos2d::CCRect Src; // [rsp+30h] [rbp-68h] BYREF unsigned __int64 v14; // [rsp+48h] [rbp-50h] if ( !a1->m_isPlatformer ) { CurrentPercent = PlayLayer::getCurrentPercent(a1); m_progressWidth = a1->m_progressWidth; v4 = 100.0; v5 = (float)(fmaxf(0.0099999998, CurrentPercent) / 100.0) * m_progressWidth; if ( v5 <= m_progressWidth ) m_progressWidth = v5; v6 = a1->m_progressFill->__vftable; cocos2d::CCRect::CCRect(&Src, 0.0, 0.0, m_progressWidth, a1->m_progressHeight); v6->setTextureRect_0(a1->m_progressFill, v7); if ( a1->m_decimalPercentage ) { if ( fmaxf(CurrentPercent, 0.0) <= 100.0 ) v4 = fmaxf(0.0, CurrentPercent); v8 = a1->m_percentageLabel->__vftable; v9 = cocos2d::CCString::createWithFormat("%.2f%%", v4); CString = cocos2d::CCString::getCString(v9); v8->setString(&a1->m_percentageLabel->cocos2d::CCLabelProtocol, CString); } else { v11 = 0; if ( (int)CurrentPercent > 0 ) v11 = (int)CurrentPercent; if ( v11 > 100 ) v11 = 100; GameToolbox::intToString(&Src, v11); sub_140041270(&Src, "%", 1u); p_Src = (const char *)&Src; if ( v14 > 0xF ) p_Src = (const char *)Src.origin; a1->m_percentageLabel->setString(&a1->m_percentageLabel->cocos2d::CCLabelProtocol, p_Src); sub_14003A830((__int64)&Src); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source