// // PauseLayer::setupProgressBars from 0x1003d6820 to 0x1003d7122 (2306 bytes) // // 1 xrefs: // > PauseLayer::customSetup @ 0x1003d5fa3 // // 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 PauseLayer::setupProgressBars(PauseLayer *a1) { GJGameLevel *m_level; // rbx GameManager *v3; // rax int PlayTimerMilli; // eax cocos2d::CCString *v5; // rax cocos2d::CCSprite *v6; // r14 cocos2d::CCSprite *v7; // r13 __int64 v8; // rax int NormalPercent; // eax __m128 width_low; // xmm2 int v11; // eax cocos2d::CCSprite *v12; // r12 unsigned __int64 *v13; // rbx cocos2d::CCSprite *v14; // rbx __int64 v15; // rax cocos2d::CCString *v16; // rax const char *v17; // rax cocos2d::CCLabelBMFont *v18; // r15 PauseLayer *v19; // r13 __int64 v20; // rax cocos2d::CCString *v21; // rax const char *v22; // rax cocos2d::CCLabelBMFont *v23; // rbx __int64 v24; // rax cocos2d::CCLabelBMFont *v25; // rbx unsigned __int64 *v26; // r14 cocos2d::CCLabelBMFont *v27; // rbx unsigned __int64 *v28; // r14 const char *CString; // rax cocos2d::CCString *v30; // rax const char *v31; // rax cocos2d::CCLabelBMFont *v32; // r14 std::string *v33; // rax const char *v34; // rdi cocos2d::CCLabelBMFont *v35; // rbx unsigned __int64 *v36; // r14 unsigned __int64 v37; // [rsp+0h] [rbp-A0h] BYREF std::string v38; // [rsp+8h] [rbp-98h] BYREF GJGameLevel *v39; // [rsp+20h] [rbp-80h] float v40; // [rsp+28h] [rbp-78h] BYREF float v41; // [rsp+2Ch] [rbp-74h] __int128 v42; // [rsp+30h] [rbp-70h] BYREF void *__p; // [rsp+40h] [rbp-60h] std::string v44; // [rsp+50h] [rbp-50h] BYREF PauseLayer *v45; // [rsp+68h] [rbp-38h] __int16 v46; // [rsp+74h] [rbp-2Ch] BYREF char v47; // [rsp+76h] [rbp-2Ah] double v48; // 0:xmm0_8.8 m_level = GameManager::sharedState()->m_playLayer->m_level; cocos2d::CCDirector::sharedDirector(); *(cocos2d::CCSize *)&v48 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v40); v47 = 0; v46 = 0; if ( GJGameLevel::isPlatformer(m_level) ) { v3 = GameManager::sharedState(); PlayTimerMilli = GJBaseGameLayer::getPlayTimerMilli(v3->m_playLayer); memset(&v44, 0, sizeof(v44)); if ( PlayTimerMilli / 60000 % 60 != 0 || (unsigned int)(PlayTimerMilli + 3599999) >= 0x6DDCFF ) { if ( (unsigned int)(PlayTimerMilli + 3599999) > 0x6DDCFE ) v5 = (cocos2d::CCString *)sub_1007AB580("%02d:%02d:%02d.%03d", v37); else v5 = (cocos2d::CCString *)sub_1007AB580("%02d:%02d.%03d", v37); } else { v5 = (cocos2d::CCString *)sub_1007AB580("%i.%03d", v37); } CString = cocos2d::CCString::getCString(v5); std::string::assign(&v44, CString); v30 = (cocos2d::CCString *)sub_1007AB580("Time: %s", v37); v31 = cocos2d::CCString::getCString(v30); v32 = cocos2d::CCLabelBMFont::create_3(v31, "goldFont.fnt"); ((void (__fastcall *)(PauseLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v32, 3); sub_10028CBE0((float *)&v42, v40 * 0.5, (float)(0.5 * v41) + 85.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v32->setPosition)(v32, &v42); cocos2d::CCLabelBMFont::limitLabelWidth(v32, 150.0, 0.80000001, 0.0); if ( GameManager::sharedState()->m_playLayer->m_gameState.m_unkBool32 ) { GameManager::sharedState(); GameToolbox::pointsToString(&v38); v33 = std::string::insert(&v38, 0, "Points: "); __p = v33->__r_.__value_.__l.__data_; v42 = *(_OWORD *)&v33->__r_.__value_.__l.0; *(_OWORD *)&v33->__r_.__value_.__l.0 = 0; v33->__r_.__value_.__r.__words[2] = 0; if ( (*(_BYTE *)&v38.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v38.__r_.__value_.__l.__data_); if ( (v42 & 1) != 0 ) v34 = (const char *)__p; else v34 = (char *)&v42 + 1; v35 = cocos2d::CCLabelBMFont::create_3(v34, "goldFont.fnt"); ((void (__fastcall *)(PauseLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v35, 3); v36 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v32->getPosition)(v32); sub_10028CBE0((float *)&v37, 0.0, -35.0); sub_10028CCE0((double *)&v38, v36, &v37); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v35->setPosition)(v35, &v38); cocos2d::CCLabelBMFont::limitLabelWidth(v35, 150.0, 0.80000001, 0.0); if ( (v42 & 1) != 0 ) operator delete(__p); } if ( (*(_BYTE *)&v44.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v44.__r_.__value_.__l.__data_); } else { v39 = m_level; v6 = cocos2d::CCSprite::create_1("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *, double))v6->setColor)(v6, &v46, v48); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v6->setOpacity)(v6, 125); ((void (__fastcall *)(cocos2d::CCSprite *, float))v6->setScale)(v6, 1.0); ((void (__fastcall *)(PauseLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v6, 3); sub_10028CBE0((float *)&v44, v40 * 0.5, (float)(v41 * 0.5) + 80.0); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v6->setPosition)(v6, &v44); v7 = cocos2d::CCSprite::create_1("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v7->setScaleX)(v7, 0.99199998); ((void (__fastcall *)(cocos2d::CCSprite *, float))v7->setScaleY)(v7, 0.86000001); ((void (__fastcall *)(cocos2d::CCSprite *, void *))v7->setColor)(v7, &unk_10081AF73); *(float *)&v45 = v7->m_obRect.size.width - (float)(0.99199998 * v7->m_obRect.size.width); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v6->addChild_0)(v6, v7, 1); sub_10028CBE0((float *)&v44, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v7->setAnchorPoint)(v7, &v44); *(float *)&v45 = *(float *)&v45 * 0.5; v8 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v6->getContentSize)(v6); sub_10028CBE0((float *)&v44, *(float *)&v45, 0.5 * *(float *)(v8 + 4)); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v7->setPosition)(v7, &v44); *(float *)&v45 = v7->m_obRect.size.width; NormalPercent = GJGameLevel::getNormalPercent(m_level); width_low = (__m128)LODWORD(v7->m_obRect.size.width); if ( *(float *)&v45 > (float)((float)((float)NormalPercent / 100.0) * *(float *)&v45) ) { *(float *)&v45 = v7->m_obRect.size.width; v11 = GJGameLevel::getNormalPercent(m_level); width_low = (__m128)(unsigned int)v45; width_low.f32[0] = *(float *)&v45 * (float)((float)v11 / 100.0); } sub_10028CC00((__int64)&v44, 0.0, 0.0, width_low, (__m128)LODWORD(v7->m_obRect.size.height)); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v7->setTextureRect)(v7, &v44); v12 = cocos2d::CCSprite::create_1("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v12->setColor)(v12, &v46); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v12->setOpacity)(v12, 125); ((void (__fastcall *)(cocos2d::CCSprite *, float))v12->setScale)(v12, 1.0); ((void (__fastcall *)(PauseLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v12, 3); v13 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v6->getPosition)(v6); sub_10028CBE0((float *)&v42, 0.0, -50.0); v45 = a1; sub_10028CCE0((double *)&v44, v13, (unsigned __int64 *)&v42); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v12->setPosition)(v12, &v44); v14 = cocos2d::CCSprite::create_1("GJ_progressBar_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v14->setScaleX)(v14, 0.99199998); ((void (__fastcall *)(cocos2d::CCSprite *, float))v14->setScaleY)(v14, 0.86000001); v44.__r_.__value_.__s.__data_[1] = -1; *(_WORD *)&v44.__r_.__value_.__l.0 = -256; ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v14->setColor)(v14, &v44); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v12->addChild_0)(v12, v14, 1); sub_10028CBE0((float *)&v44, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v14->setAnchorPoint)(v14, &v44); v15 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v7->getPosition)(v7); ((void (__fastcall *)(cocos2d::CCSprite *, __int64))v14->setPosition)(v14, v15); width_low.f32[0] = fminf( (float)((float)v39->m_practicePercent / 100.0) * v14->m_obRect.size.width, v14->m_obRect.size.width); sub_10028CC00((__int64)&v44, 0.0, 0.0, width_low, (__m128)LODWORD(v14->m_obRect.size.height)); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v14->setTextureRect)(v14, &v44); GJGameLevel::getNormalPercent(v39); v16 = (cocos2d::CCString *)sub_1007AB580("%i%%", v37); v17 = cocos2d::CCString::getCString(v16); v18 = cocos2d::CCLabelBMFont::create_3(v17, "bigFont.fnt"); v19 = v45; ((void (__fastcall *)(PauseLayer *, cocos2d::CCLabelBMFont *, __int64))v45->addChild_0)(v45, v18, 4); v20 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v6->getPosition)(v6); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v18->setPosition)(v18, v20); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v18->setScale)(v18, 0.5); v21 = (cocos2d::CCString *)sub_1007AB580("%i%%", v37); v22 = cocos2d::CCString::getCString(v21); v23 = cocos2d::CCLabelBMFont::create_3(v22, "bigFont.fnt"); ((void (__fastcall *)(PauseLayer *, cocos2d::CCLabelBMFont *, __int64))v19->addChild_0)(v19, v23, 4); v24 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v12->getPosition)(v12); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v23->setPosition)(v23, v24); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v23->setScale)(v23, 0.5); v25 = cocos2d::CCLabelBMFont::create_3("Normal Mode", "bigFont.fnt"); ((void (__fastcall *)(PauseLayer *, cocos2d::CCLabelBMFont *, __int64))v19->addChild_0)(v19, v25, 4); v26 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v6->getPosition)(v6); sub_10028CBE0((float *)&v42, 0.0, 20.0); sub_10028CCE0((double *)&v44, v26, (unsigned __int64 *)&v42); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v25->setPosition)(v25, &v44); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v25->setScale)(v25, 0.5); v27 = cocos2d::CCLabelBMFont::create_3("Practice Mode", "bigFont.fnt"); ((void (__fastcall *)(PauseLayer *, cocos2d::CCLabelBMFont *, __int64))v19->addChild_0)(v19, v27, 4); v28 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v12->getPosition)(v12); sub_10028CBE0((float *)&v42, 0.0, 20.0); sub_10028CCE0((double *)&v44, v28, (unsigned __int64 *)&v42); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))v27->setPosition)(v27, &v44); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v27->setScale)(v27, 0.5); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source