// // LevelInfoLayer::setupProgressBars from 0x3b1ba4 to 0x3b2072 (1230 bytes) // // 1 xrefs: // > LevelInfoLayer::init @ 0x3b504a // // 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 LevelInfoLayer::setupProgressBars(LevelInfoLayer *a1) { cocos2d::CCDirector *v2; // r0 const char *v3; // r1 cocos2d::CCNode *v4; // r8 float width; // s17 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 cocos2d::CCDirector *v7; // r0 float v8; // r0 const char *v9; // r1 float *v10; // r4 float v11; // s17 void (__fastcall *v12)(float *, cocos2d::CCRect *); // r5 void (__fastcall *v13)(float *, cocos2d::CCRect *); // r5 int v14; // r0 float v15; // s17 float v16; // s15 bool v17; // fzf bool v18; // fnf float v19; // s17 void (__fastcall *v20)(float *, cocos2d::CCRect *); // r5 const char *v21; // r1 cocos2d::CCNode *v22; // r9 int v23; // r11 const char *v24; // r1 float *v25; // r5 void (__fastcall *v26)(float *, cocos2d::CCRect *); // r2 void (__fastcall *v27)(float *, cocos2d::CCRect *); // r11 void (__fastcall *v28)(float *, int); // r11 int v29; // r0 float v30; // s14 void (__fastcall *v31)(float *, cocos2d::CCRect *); // r4 float v32; // r3 const char *NormalPercent; // r0 cocos2d::CCString *v34; // r0 char *CString; // r0 GameManager *v36; // r0 int v37; // r0 const char *v38; // r1 cocos2d::CCString *v39; // r0 char *v40; // r0 cocos2d::CCLabelBMFont *v41; // r4 void (__fastcall *v42)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v43; // r0 cocos2d::CCString *v44; // r0 cocos2d::CCLabelBMFont *v45; // r4 void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v47; // r0 cocos2d::CCLabelBMFont *v48; // r4 void (__fastcall *v49)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v50; // r8 cocos2d::CCLabelBMFont *v51; // r4 void (__fastcall *v52)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 int v53; // r8 void (__fastcall *v54)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-38h] _BYTE v55[4]; // [sp+14h] [bp-30h] BYREF cocos2d::CCLabelBMFont *v56; // [sp+18h] [bp-2Ch] BYREF cocos2d::CCSize v57; // [sp+1Ch] [bp-28h] BYREF cocos2d::CCPoint v58; // [sp+24h] [bp-20h] BYREF cocos2d::CCRect v59; // [sp+2Ch] [bp-18h] BYREF v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v57, v2); v55[0] = 0; v55[1] = 0; v55[2] = 0; v4 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v3); ((void (__fastcall *)(cocos2d::CCNode *, _BYTE *))v4->__vftable[1].getTag)(v4, v55); ((void (__fastcall *)(cocos2d::CCNode *, int))v4->__vftable[1].~CCNode_0)(v4, 125); ((void (__fastcall *)(cocos2d::CCNode *, int))v4->setScale)(v4, 1060320051); a1->addChild_0(a1, v4, 3); width = v57.width; setPosition = v4->setPosition; v7 = cocos2d::CCDirector::sharedDirector(); v8 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v7)); cocos2d::CCPoint::CCPoint(&v59.origin, width * 0.5, v8 + 136.0); setPosition(v4, &v59.origin); v10 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v9); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v10 + 64))(v10, 1065218998); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v10 + 72))(v10, 1063004406); (*(void (__fastcall **)(float *, void *))(*(_DWORD *)v10 + 472))(v10, &unk_9AAA48); v11 = v10[86] - (float)(v10[86] * 0.992); v4->addChild_0(v4, (cocos2d::CCNode *)v10, 1); v12 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_DWORD *)v10 + 140); cocos2d::CCPoint::CCPoint(&v59.origin, 0.0, 0.5); v12(v10, &v59); v13 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_DWORD *)v10 + 92); v14 = (int)v4->getContentSize(v4); cocos2d::CCPoint::CCPoint(&v59.origin, v11 * 0.5, *(float *)(v14 + 4) * 0.5); v13(v10, &v59); v15 = v10[86]; v16 = v15 * (float)((float)GJGameLevel::getNormalPercent(a1->m_level) / 100.0); v17 = v15 == v16; v18 = v15 < v16; v19 = v10[86]; if ( !v18 && !v17 ) v19 = v19 * (float)((float)GJGameLevel::getNormalPercent(a1->m_level) / 100.0); v20 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_DWORD *)v10 + 560); cocos2d::CCRect::CCRect(&v59, 0.0, 0.0, v19, v10[87]); v20(v10, &v59); v22 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v21); ((void (__fastcall *)(cocos2d::CCNode *, _BYTE *))v22->__vftable[1].getTag)(v22, v55); ((void (__fastcall *)(cocos2d::CCNode *, int))v22->__vftable[1].~CCNode_0)(v22, 125); ((void (__fastcall *)(cocos2d::CCNode *, int))v22->setScale)(v22, 1060320051); a1->addChild_0(a1, v22, 3); v54 = v22->setPosition; v23 = (int)v4->getPosition(v4); cocos2d::CCPoint::CCPoint(&v58, 0.0, -32.0); cocos2d::CCPoint::operator+(&v59, v23, &v58); v54(v22, &v59.origin); v25 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v24); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v25 + 64))(v25, 1065218998); (*(void (__fastcall **)(float *, int))(*(_DWORD *)v25 + 72))(v25, 1063004406); v26 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_DWORD *)v25 + 472); LOWORD(v59.origin.x) = -256; BYTE2(v59.origin.x) = -1; v26(v25, &v59); v22->addChild_0(v22, (cocos2d::CCNode *)v25, 1); v27 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_DWORD *)v25 + 140); cocos2d::CCPoint::CCPoint(&v59.origin, 0.0, 0.5); v27(v25, &v59); v28 = *(void (__fastcall **)(float *, int))(*(_DWORD *)v25 + 92); v29 = (*(int (__fastcall **)(float *))(*(_DWORD *)v10 + 96))(v10); v28(v25, v29); v30 = v25[86]; v31 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_DWORD *)v25 + 560); if ( v30 > (float)(v30 * (float)((float)a1->m_level->m_practicePercent / 100.0)) ) v32 = v30 * (float)((float)a1->m_level->m_practicePercent / 100.0); else v32 = v25[86]; cocos2d::CCRect::CCRect(&v59, 0.0, 0.0, v32, v25[87]); v31(v25, &v59); NormalPercent = (const char *)GJGameLevel::getNormalPercent(a1->m_level); v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", NormalPercent); CString = (char *)cocos2d::CCString::getCString(v34); sub_776584((int)&v56, CString); v36 = GameManager::sharedState(); if ( GameManager::getGameVariable(v36, "0099") ) { v37 = GJGameLevel::getNormalPercent(a1->m_level); v38 = (const char *)(a1->m_level->m_newNormalPercent2.random - a1->m_level->m_newNormalPercent2.seed); if ( (const char *)v37 != v38 ) { v39 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)" (%i%%)", v38); v40 = (char *)cocos2d::CCString::getCString(v39); sub_774544((int)&v56, v40); } } v41 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v41, 4); v42 = v41->setPosition; v43 = (int)v4->getPosition(v4); v42(v41, (const cocos2d::CCPoint *)v43); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v41->setScale)(v41, 1053609165); v44 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i%%", (const char *)a1->m_level->m_practicePercent); cocos2d::CCString::getCString(v44); v45 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v45, 4); v46 = v45->setPosition; v47 = (int)v22->getPosition(v22); v46(v45, (const cocos2d::CCPoint *)v47); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v45->setScale)(v45, 1053609165); v48 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v48, 4); v49 = v48->setPosition; v50 = (int)v4->getPosition(v4); cocos2d::CCPoint::CCPoint(&v58, 0.0, 15.0); cocos2d::CCPoint::operator+(&v59, v50, &v58); v49(v48, &v59.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v48->setScale)(v48, 1053609165); v51 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v51, 4); v52 = v51->setPosition; v53 = (int)v22->getPosition(v22); cocos2d::CCPoint::CCPoint(&v58, 0.0, 15.0); cocos2d::CCPoint::operator+(&v59, v53, &v58); v52(v51, &v59.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v51->setScale)(v51, 1053609165); sub_774008(&v56); }
GD Web Decomp Icon

GD Web Decomp

Raw Source