// // LevelInfoLayer::setupLevelInfo from 0x6da5d8 to 0x6db118 (2880 bytes) // // 2 xrefs: // > LevelInfoLayer::init @ 0x6dba98 // > @ 0x771f0 // // 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::setupLevelInfo(LevelInfoLayer *a1) { cocos2d::CCArray *v2; // x0 cocos2d::CCDirector *v3; // x0 cocos2d::CCSprite *v4; // x21 cocos2d::CCSprite *v5; // x22 cocos2d::CCLabelBMFont *v6; // x0 cocos2d::CCLabelBMFont_vtbl *v7; // x1 cocos2d::CCLabelBMFont *m_lengthLabel; // x27 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v10; // x0 cocos2d::CCLabelBMFont_vtbl *v11; // x1 cocos2d::CCLabelBMFont *m_exactLengthLabel; // x27 void (__fastcall *v13)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v14; // x0 cocos2d::CCLabelBMFont_vtbl *v15; // x1 cocos2d::CCLabelBMFont *m_downloadsLabel; // x27 void (__fastcall *v17)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v18; // x0 cocos2d::CCLabelBMFont_vtbl *v19; // x1 cocos2d::CCLabelBMFont *m_likesLabel; // x27 void (__fastcall *v21)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v22; // x0 cocos2d::CCLabelBMFont_vtbl *v23; // x1 cocos2d::CCLabelBMFont *m_orbsLabel; // x24 void (__fastcall *v25)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x26 GJGameLevel *m_level; // x0 _BOOL4 v27; // w24 _BOOL4 isPlatformer; // w26 float v29; // s9 float v30; // s8 float v31; // s11 void (__fastcall *v32)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCLabelBMFont *v34; // x27 cocos2d::CCSprite *v35; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v37)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 __int64 v38; // x0 cocos2d::CCSprite *m_likesIcon; // x22 void (__fastcall *v40)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v41; // x22 void (__fastcall *v42)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCLabelBMFont *v43; // x22 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 const cocos2d::CCPoint *v45; // x0 void (__fastcall *v46)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 void (__fastcall *v47)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 float v48; // s13 cocos2d::CCLabelBMFont *v49; // x27 void (__fastcall *v50)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v51; // x0 cocos2d::CCLabelBMFont *v52; // x27 void (__fastcall *v53)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCSprite *m_orbsIcon; // x27 void (__fastcall *v55)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCSprite *v56; // x27 void (__fastcall *v57)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v58; // x27 void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 const cocos2d::CCPoint *v60; // x0 float v61; // s0 float v62; // s1 GJDifficultySprite *v63; // x0 LevelInfoLayer_vtbl *v64; // x3 const char *v65; // x0 cocos2d::CCSprite *v66; // x0 LevelInfoLayer_vtbl *v67; // x2 cocos2d::CCSprite *m_starsIcon; // x26 void (__fastcall *v69)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCLabelBMFont *v70; // x0 LevelInfoLayer_vtbl *v71; // x2 cocos2d::CCLabelBMFont *m_starsLabel; // x26 void (__fastcall *v73)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCLabelBMFont *v74; // x26 void (__fastcall *v75)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 const cocos2d::CCPoint *v76; // x28 GJGameLevel *v77; // x1 cocos2d::CCSprite *v78; // x26 GameStatsManager *v79; // x0 unsigned int BaseDiamonds; // w28 GameStatsManager *v81; // x0 unsigned int AwardedDiamondsForLevel; // w27 cocos2d::CCString *v83; // x0 char *CString; // x0 cocos2d::CCLabelBMFont *v85; // x24 void (__fastcall *v86)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x25 float width; // s8 float v88; // s0 void (__fastcall *v89)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 float v90; // s0 float v91; // s1 void (__fastcall *v92)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 __int64 v93; // x25 cocos2d::CCArray **p_m_pTargetArray; // x0 unsigned int v95; // w20 unsigned int v96; // w1 __int64 v97; // x0 unsigned int *p_m_nExtraKerning; // x2 int m_nExtraKerning; // w1 void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 const cocos2d::CCPoint *v101; // [xsp+98h] [xbp+98h] float v102; // [xsp+A8h] [xbp+A8h] float v103; // [xsp+ACh] [xbp+ACh] cocos2d::CCLabelBMFont *v104; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCPoint v105; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCPoint v106; // [xsp+C0h] [xbp+C0h] BYREF v2 = (cocos2d::CCArray *)cocos2d::CCArray::create(_stack_chk_guard); a1->m_icons = v2; cocos2d::CCObject::retain(v2); v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v3); v4 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); v5 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png"); a1->m_orbsIcon = cocos2d::CCSprite::createWithSpriteFrameName("currencyOrbIcon_001.png"); a1->m_likesIcon = cocos2d::CCSprite::createWithSpriteFrameName("GJ_likesIcon_001.png"); v6 = cocos2d::CCLabelBMFont::create(); v7 = v6->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_lengthLabel = v6; ((void (__fastcall *)(float))v7->setScale)(0.5); m_lengthLabel = a1->m_lengthLabel; setAnchorPoint = m_lengthLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); setAnchorPoint(m_lengthLabel, &v106); v10 = cocos2d::CCLabelBMFont::create(); v11 = v10->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_exactLengthLabel = v10; ((void (__fastcall *)(float))v11->setScale)(0.5); m_exactLengthLabel = a1->m_exactLengthLabel; v13 = m_exactLengthLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v13(m_exactLengthLabel, &v106); v14 = cocos2d::CCLabelBMFont::create(); v15 = v14->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_downloadsLabel = v14; ((void (__fastcall *)(float))v15->setScale)(0.5); m_downloadsLabel = a1->m_downloadsLabel; v17 = m_downloadsLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v17(m_downloadsLabel, &v106); v18 = cocos2d::CCLabelBMFont::create(); v19 = v18->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_likesLabel = v18; ((void (__fastcall *)(float))v19->setScale)(0.5); m_likesLabel = a1->m_likesLabel; v21 = m_likesLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v21(m_likesLabel, &v106); v22 = cocos2d::CCLabelBMFont::create(); v23 = v22->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_orbsLabel = v22; ((void (__fastcall *)(float))v23->setScale)(0.5); m_orbsLabel = a1->m_orbsLabel; v25 = m_orbsLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v25(m_orbsLabel, &v106); cocos2d::CCArray::addObject(a1->m_icons, v4); cocos2d::CCArray::addObject(a1->m_icons, v5); cocos2d::CCArray::addObject(a1->m_icons, a1->m_orbsIcon); cocos2d::CCArray::addObject(a1->m_icons, a1->m_likesIcon); cocos2d::CCArray::addObject(a1->m_icons, a1->m_downloadsLabel); cocos2d::CCArray::addObject(a1->m_icons, a1->m_lengthLabel); cocos2d::CCArray::addObject(a1->m_icons, a1->m_exactLengthLabel); cocos2d::CCArray::addObject(a1->m_icons, a1->m_likesLabel); cocos2d::CCArray::addObject(a1->m_icons, a1->m_orbsLabel); a1->addChild(a1, v4); a1->addChild(a1, v5); a1->addChild(a1, a1->m_orbsIcon); a1->addChild(a1, a1->m_likesIcon); a1->addChild(a1, a1->m_downloadsLabel); a1->addChild(a1, a1->m_lengthLabel); a1->addChild(a1, a1->m_exactLengthLabel); a1->addChild(a1, a1->m_likesLabel); a1->addChild(a1, a1->m_orbsLabel); m_level = a1->m_level; v27 = m_level->m_stars.random - m_level->m_stars.seed > 0; isPlatformer = GJGameLevel::isPlatformer(m_level); v29 = (float)(v102 * 0.5) + 80.0; v30 = (float)(v103 * 0.5) + 51.0; if ( v27 ) { v31 = 28.0; v30 = v30 + 10.0; } else { v31 = 30.0; } v32 = v5->setAnchorPoint; a1->m_iconOffset = 10.0; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v32(v5, &v106); setPosition = v5->setPosition; cocos2d::CCPoint::CCPoint(&v106, v29, v30 + v31); setPosition(v5, &v106); v34 = a1->m_downloadsLabel; v35 = v5; getPosition = v5->getPosition; v37 = v34->setPosition; v38 = (__int64)getPosition(v35); cocos2d::CCPoint::CCPoint(&v106, v29 + 33.0, *(float *)(v38 + 4)); v37(v34, &v106); m_likesIcon = a1->m_likesIcon; v40 = m_likesIcon->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v40(m_likesIcon, &v106); v41 = a1->m_likesIcon; v42 = v41->setPosition; cocos2d::CCPoint::CCPoint(&v106, v29, v30 + 1.0); v42(v41, &v106); v43 = a1->m_likesLabel; v44 = v43->setPosition; v45 = a1->m_likesIcon->getPosition(a1->m_likesIcon); cocos2d::CCPoint::CCPoint(&v106, v29 + 33.0, v45->y); v44(v43, &v106); v46 = v4->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v46(v4, &v106); v47 = v4->setPosition; cocos2d::CCPoint::CCPoint(&v106, v29, v30 - v31); v47(v4, &v106); v48 = 0.0; if ( isPlatformer ) v48 = 6.0; v49 = a1->m_lengthLabel; v50 = v49->setPosition; v51 = (__int64)v4->getPosition(v4); cocos2d::CCPoint::CCPoint(&v106, v29 + 33.0, v48 + *(float *)(v51 + 4)); v50(v49, &v106); v52 = a1->m_exactLengthLabel; v53 = v52->setPosition; v101 = a1->m_lengthLabel->getPosition(a1->m_lengthLabel); cocos2d::CCPoint::CCPoint(&v105, 0.0, -14.0); cocos2d::CCPoint::operator+(&v106, v101, &v105); v53(v52, &v106); m_orbsIcon = a1->m_orbsIcon; v55 = m_orbsIcon->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 0.0, 0.5); v55(m_orbsIcon, &v106); v56 = a1->m_orbsIcon; v57 = v56->setPosition; cocos2d::CCPoint::CCPoint(&v106, v29 + 1.0, v30 - (float)(v31 * 2.0)); v57(v56, &v106); v58 = a1->m_orbsLabel; v59 = v58->setPosition; v60 = a1->m_orbsIcon->getPosition(a1->m_orbsIcon); cocos2d::CCPoint::CCPoint(&v106, v29 + 33.0, v60->y); v59(v58, &v106); a1->m_orbsIcon->setVisible(a1->m_orbsIcon, v27); a1->m_orbsLabel->setVisible(a1->m_orbsLabel, v27); cocos2d::CCPoint::CCPoint(&v106, (float)(v102 * 0.5) + -100.0, v30 + 5.0); cocos2d::CCPoint::operator=(&a1->m_basePosition, v61, v62); v63 = GJDifficultySprite::create(1, Long); v64 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_difficultySprite = v63; ((void (__fastcall *)(LevelInfoLayer *))v64->addChild_0)(a1); a1->m_difficultySprite->setPosition(a1->m_difficultySprite, &a1->m_basePosition); if ( isPlatformer ) v65 = "moon_small01_001.png"; else v65 = "star_small01_001.png"; v66 = cocos2d::CCSprite::createWithSpriteFrameName(v65); v67 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_starsIcon = v66; ((void (__fastcall *)(LevelInfoLayer *))v67->addChild)(a1); m_starsIcon = a1->m_starsIcon; v69 = m_starsIcon->setPosition; cocos2d::CCPoint::CCPoint(&v105, 8.0, -30.0); cocos2d::CCPoint::operator+(&v106, &a1->m_basePosition, &v105); v69(m_starsIcon, &v106); v70 = cocos2d::CCLabelBMFont::create(); v71 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_starsLabel = v70; ((void (__fastcall *)(LevelInfoLayer *))v71->addChild)(a1); m_starsLabel = a1->m_starsLabel; v73 = m_starsLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 1.0, 0.5); v73(m_starsLabel, &v106); v74 = a1->m_starsLabel; v75 = v74->setPosition; v76 = a1->m_starsIcon->getPosition(a1->m_starsIcon); cocos2d::CCPoint::CCPoint(&v105, -8.0, 0.0); cocos2d::CCPoint::operator+(&v106, v76, &v105); v75(v74, &v106); a1->m_starsLabel->setScale(a1->m_starsLabel, 0.4); a1->m_baseStarsY = a1->m_starsLabel->getPosition(a1->m_starsLabel)->y; if ( v27 ) { v77 = a1->m_level; if ( v77->m_dailyID.random - v77->m_dailyID.seed > 0 || v77->m_gauntletLevel ) { v78 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png"); a1->addChild(a1, v78); v79 = GameStatsManager::sharedState(); BaseDiamonds = GameStatsManager::getBaseDiamonds(v79, a1->m_level->m_stars.random - a1->m_level->m_stars.seed); v81 = GameStatsManager::sharedState(); AwardedDiamondsForLevel = GameStatsManager::getAwardedDiamondsForLevel(v81, a1->m_level); v83 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i/%i", (const char *)AwardedDiamondsForLevel, BaseDiamonds); CString = (char *)cocos2d::CCString::getCString(v83); sub_D153B8((int)&v104, CString); v85 = cocos2d::CCLabelBMFont::create(); a1->addChild(a1, v85); v86 = v85->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v106, 1.0, 0.5); v86(v85, &v106); v85->setScale(v85, 0.35); width = v85->getContentSize(v85)->width; v88 = v85->getScale(v85); v89 = v78->setPosition; v90 = (float)((float)(width * v88) * 0.5) + 2.0; if ( a1->m_level->m_stars.random - a1->m_level->m_stars.seed == 10 ) v91 = -48.5; else v91 = -44.5; cocos2d::CCPoint::CCPoint(&v105, v90, v91); cocos2d::CCPoint::operator+(&v106, &a1->m_basePosition, &v105); v89(v78, &v106); v92 = v85->setPosition; v93 = (__int64)v78->getPosition(v78); cocos2d::CCPoint::CCPoint(&v105, -8.0, 0.0); cocos2d::CCPoint::operator+(&v106, v93, &v105); v92(v85, &v106); if ( BaseDiamonds == AwardedDiamondsForLevel ) { setColor = v85->setColor; LOWORD(v106.x) = -156; BYTE2(v106.x) = -1; setColor(v85, (const cocos2d::ccColor3B *)&v106); } p_m_pTargetArray = &v104[-1].m_pTargetArray; if ( &v104[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v104[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v104[-1].m_nExtraKerning; v104[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } } } v95 = 0; if ( a1->m_challenge ) { while ( v95 < (unsigned int)cocos2d::CCArray::count(a1->m_icons) ) { v96 = v95++; v97 = cocos2d::CCArray::objectAtIndex(a1->m_icons, v96); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v97 + 328LL))(v97, 0); } a1->m_orbsIcon->setVisible(a1->m_orbsIcon, 0); a1->m_orbsLabel->setVisible(a1->m_orbsLabel, 0); } LevelInfoLayer::updateLabelValues(a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source