// // LevelInfoLayer::setupProgressBars from 0x6d7db4 to 0x6d84e4 (1840 bytes) // // 2 xrefs: // > LevelInfoLayer::init @ 0x6dcfac // > @ 0x61650 // // 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; // x0 const char *v3; // x1 cocos2d::CCNode *v4; // x20 float v5; // s9 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCDirector *v7; // x0 float v8; // s0 const char *v9; // x1 float *v10; // x22 float v11; // s12 void (__fastcall *v12)(float *, cocos2d::CCRect *); // x25 void (__fastcall *v13)(float *, cocos2d::CCRect *); // x25 __int64 v14; // x0 float v15; // s12 float v16; // s2 void (__fastcall *v17)(float *, cocos2d::CCRect *); // x23 const char *v18; // x1 cocos2d::CCNode *v19; // x23 void (__fastcall *v20)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 __int64 v21; // x28 const char *v22; // x1 float *v23; // x24 void (__fastcall *v24)(float *, cocos2d::CCRect *); // x3 void (__fastcall *v25)(float *, cocos2d::CCRect *); // x27 float *v26; // x0 __int64 (__fastcall *v27)(float *); // x1 void (__fastcall *v28)(float *, __int64); // x22 __int64 v29; // x0 float v30; // s0 float v31; // s2 void (__fastcall *v32)(float *, cocos2d::CCRect *); // x28 unsigned int NormalPercent; // w0 cocos2d::CCString *v34; // x0 char *CString; // x0 GameManager *v36; // x0 cocos2d::CCLabelBMFont *v37; // x22 void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v39; // x0 cocos2d::CCString *v40; // x0 cocos2d::CCLabelBMFont *v41; // x22 void (__fastcall *v42)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 __int64 v43; // x0 cocos2d::CCLabelBMFont *v44; // x22 cocos2d::CCNode *v45; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v47)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 __int64 v48; // x27 cocos2d::CCLabelBMFont *v49; // x20 void (__fastcall *v50)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 __int64 v51; // x22 cocos2d::CCArray **p_m_pTargetArray; // x0 float v53; // s12 int v54; // w0 const char *v55; // x1 cocos2d::CCString *v56; // x0 size_t v57; // x0 unsigned int *p_m_nExtraKerning; // x2 int m_nExtraKerning; // w1 __int64 v60; // [xsp+0h] [xbp+0h] BYREF const char *v61; // [xsp+98h] [xbp+98h] _BYTE v62[8]; // [xsp+A8h] [xbp+A8h] BYREF float v63; // [xsp+B0h] [xbp+B0h] cocos2d::CCLabelBMFont *v64; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCPoint v65; // [xsp+C0h] [xbp+C0h] BYREF cocos2d::CCRect v66; // [xsp+C8h] [xbp+C8h] BYREF v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); v62[0] = 0; v62[1] = 0; v62[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, v62); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v4->__vftable[1].~CCNode_0)(v4, 125); v4->setScale(v4, 0.7); a1->addChild_0(a1, v4, 3); v5 = v63 * 0.5; setPosition = v4->setPosition; v7 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v7); cocos2d::CCPoint::CCPoint(&v66.origin, v5, v8 + 136.0); setPosition(v4, &v66.origin); v10 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v9); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v10 + 128LL))(v10, 0.992); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v10 + 144LL))(v10, 0.86); (*(void (__fastcall **)(float *, void *))(*(_QWORD *)v10 + 944LL))(v10, &unk_EC8760); v11 = v10[108] - (float)(v10[108] * 0.992); v4->addChild_0(v4, (cocos2d::CCNode *)v10, 1); v12 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v10 + 280LL); cocos2d::CCPoint::CCPoint(&v66.origin, 0.0, 0.5); v12(v10, &v66); v13 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v10 + 184LL); v14 = (__int64)v4->getContentSize(v4); cocos2d::CCPoint::CCPoint(&v66.origin, v11 * 0.5, *(float *)(v14 + 4) * 0.5); v13(v10, &v66); v15 = v10[108]; if ( v15 > (float)(v15 * (float)((float)GJGameLevel::getNormalPercent(a1->m_level) / 100.0)) ) { v53 = v10[108]; v16 = v53 * (float)((float)GJGameLevel::getNormalPercent(a1->m_level) / 100.0); } else { v16 = v10[108]; } v17 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v10 + 1120LL); cocos2d::CCRect::CCRect(&v66, 0.0, 0.0, v16, v10[109]); v17(v10, &v66); v19 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v18); ((void (__fastcall *)(cocos2d::CCNode *, _BYTE *))v19->__vftable[1].getTag)(v19, v62); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v19->__vftable[1].~CCNode_0)(v19, 125); v19->setScale(v19, 0.7); a1->addChild_0(a1, v19, 3); v20 = v19->setPosition; v21 = (__int64)v4->getPosition(v4); cocos2d::CCPoint::CCPoint(&v65, 0.0, -32.0); cocos2d::CCPoint::operator+(&v66, v21, &v65); v20(v19, &v66.origin); v23 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v22); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v23 + 128LL))(v23, 0.992); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v23 + 144LL))(v23, 0.86); v24 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v23 + 944LL); BYTE2(v66.origin.x) = -1; LOWORD(v66.origin.x) = -256; v24(v23, &v66); v19->addChild_0(v19, (cocos2d::CCNode *)v23, 1); v25 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v23 + 280LL); cocos2d::CCPoint::CCPoint(&v66.origin, 0.0, 0.5); v25(v23, &v66); v26 = v10; v27 = *(__int64 (__fastcall **)(float *))(*(_QWORD *)v10 + 192LL); v28 = *(void (__fastcall **)(float *, __int64))(*(_QWORD *)v23 + 184LL); v29 = v27(v26); v28(v23, v29); v30 = v23[108]; v31 = v30 * (float)((float)a1->m_level->m_practicePercent / 100.0); if ( v30 <= v31 ) v31 = v23[108]; v32 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v23 + 1120LL); cocos2d::CCRect::CCRect(&v66, 0.0, 0.0, v31, v23[109]); v32(v23, &v66); NormalPercent = GJGameLevel::getNormalPercent(a1->m_level); v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i%%", (const char *)NormalPercent); CString = (char *)cocos2d::CCString::getCString(v34); sub_D153B8((unsigned int)&v60 + 184, CString); v36 = GameManager::sharedState(); if ( GameManager::getGameVariable(v36, "0099") ) { v54 = GJGameLevel::getNormalPercent(a1->m_level); v55 = (const char *)(unsigned int)(a1->m_level->m_newNormalPercent2.random - a1->m_level->m_newNormalPercent2.seed); if ( v54 != (_DWORD)v55 ) { v56 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)" (%i%%)", v55); v61 = cocos2d::CCString::getCString(v56); v57 = strlen(v61); sub_D15FD4(&v64, v61, v57); } } v37 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v37, 4); v38 = v37->setPosition; v39 = (__int64)v4->getPosition(v4); v38(v37, (const cocos2d::CCPoint *)v39); v37->setScale(v37, 0.4); v40 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i%%", (const char *)(unsigned int)a1->m_level->m_practicePercent); cocos2d::CCString::getCString(v40); v41 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v41, 4); v42 = v41->setPosition; v43 = (__int64)v19->getPosition(v19); v42(v41, (const cocos2d::CCPoint *)v43); v41->setScale(v41, 0.4); v44 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v44, 4); v45 = v4; getPosition = v4->getPosition; v47 = v44->setPosition; v48 = (__int64)getPosition(v45); cocos2d::CCPoint::CCPoint(&v65, 0.0, 15.0); cocos2d::CCPoint::operator+(&v66, v48, &v65); v47(v44, &v66.origin); v44->setScale(v44, 0.4); v49 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v49, 4); v50 = v49->setPosition; v51 = (__int64)v19->getPosition(v19); cocos2d::CCPoint::CCPoint(&v65, 0.0, 15.0); cocos2d::CCPoint::operator+(&v66, v51, &v65); v50(v49, &v66.origin); v49->setScale(v49, 0.4); p_m_pTargetArray = &v64[-1].m_pTargetArray; if ( &v64[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v64[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v64[-1].m_nExtraKerning; v64[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source