// // LevelCell::loadLocalLevelCell from 0x60f158 to 0x60fb58 (2560 bytes) // // 2 xrefs: // > LevelCell::loadFromLevel @ 0x612800 // > @ 0xa4b38 // // 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 LevelCell::loadLocalLevelCell(LevelCell *a1) { cocos2d::CCLabelBMFont *v2; // x21 cocos2d::CCArray **p_m_pTargetArray; // x0 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x22 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 float width; // s0 void (__fastcall *v7)(cocos2d::CCLabelBMFont *__hidden, float); // x22 float v8; // s0 float v9; // s1 const char *v10; // x6 const char *m_levelRev; // x1 cocos2d::CCString *v12; // x0 cocos2d::CCLabelBMFont *v13; // x26 void (__fastcall *v14)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27 float v15; // s8 const cocos2d::CCSize *v16; // x0 void (__fastcall *v17)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 __int64 v18; // x28 cocos2d::CCNode *v19; // x27 CCMenuItemSpriteExtra *v20; // x26 float v21; // s0 float m_width; // s9 float *v23; // x0 float v24; // s0 float v25; // s1 void (__fastcall *v26)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCSprite *v27; // x26 void (__fastcall *v28)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21 int v29; // w1 cocos2d::CCLabelBMFont *v30; // x21 cocos2d::CCArray **v31; // x0 void (__fastcall *v32)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v33; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 __int64 v36; // x27 void (__fastcall *v37)(cocos2d::CCLabelBMFont *__hidden, float); // x26 cocos2d::CCSprite *v38; // x26 void (__fastcall *v39)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x27 __int64 v40; // x28 float v41; // s11 float v42; // s0 cocos2d::CCLabelBMFont *v43; // x21 cocos2d::CCArray **v44; // x0 void (__fastcall *v45)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x24 void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 __int64 v47; // x26 void (__fastcall *v48)(cocos2d::CCLabelBMFont *__hidden, float); // x24 cocos2d::CCSprite *v49; // x24 void (__fastcall *v50)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 __int64 v51; // x27 float v52; // s10 float v53; // s0 cocos2d::CCLabelBMFont *v54; // x21 void (__fastcall *v55)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x20 void (__fastcall *v56)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 __int64 v57; // x24 void (__fastcall *v58)(cocos2d::CCLabelBMFont *__hidden, float); // x19 float *v59; // x0 long double v60; // q0 void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // x22 float *v62; // x0 unsigned int *v63; // x1 int v64; // w2 unsigned int *v65; // x1 int v66; // w2 unsigned int *p_m_nExtraKerning; // x1 int m_nExtraKerning; // w2 float v69; // [xsp+80h] [xbp+80h] cocos2d::CCSize v70; // [xsp+90h] [xbp+90h] BYREF cocos2d::CCPoint v71; // [xsp+98h] [xbp+98h] BYREF cocos2d::CCLabelBMFont *v72; // [xsp+A0h] [xbp+A0h] BYREF cocos2d::CCPoint v73; // 0:kr00_8.8 cocos2d::SEL_MenuHandler v74; // 0:x2.16 sub_D18D28(&v72, &a1->m_level->m_levelName); v2 = cocos2d::CCLabelBMFont::create(); p_m_pTargetArray = &v72[-1].m_pTargetArray; if ( &v72[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_nExtraKerning = (unsigned int *)&v72[-1].m_nExtraKerning; do m_nExtraKerning = __ldaxr(p_m_nExtraKerning); while ( __stlxr(m_nExtraKerning - 1, p_m_nExtraKerning) ); } else { m_nExtraKerning = v72[-1].m_nExtraKerning; v72[-1].m_nExtraKerning = m_nExtraKerning - 1; } if ( m_nExtraKerning <= 0 ) operator delete(p_m_pTargetArray); } a1->m_mainLayer->addChild(a1->m_mainLayer, v2); setAnchorPoint = v2->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, 0.0, 0.5); setAnchorPoint(v2, (const cocos2d::CCPoint *)&v72); v2->setScale(v2, 1.0); setPosition = v2->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, 12.0, (float)(a1->m_height * 0.5) + 14.0); setPosition(v2, (const cocos2d::CCPoint *)&v72); width = v2->getContentSize(v2)->width; if ( width > 200.0 ) { setScale = v2->setScale; v62 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v2->getContentSize)(v2, width); setScale(v2, 200.0 / *v62); } v7 = v2->setScale; v8 = v2->getScale(v2); v9 = 0.8; if ( v8 <= 0.8 ) v9 = v2->getScale(v2); v7(v2, v9); m_levelRev = (const char *)(unsigned int)a1->m_level->m_levelRev; if ( (int)m_levelRev > 0 ) { v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Rev. %i", m_levelRev); cocos2d::CCString::getCString(v12); v13 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v13); v14 = v13->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, 0.0, 0.0); v14(v13, (const cocos2d::CCPoint *)&v72); v13->setScale(v13, 0.4); v15 = v2->getScale(v2); v16 = v2->getContentSize(v2); cocos2d::CCSize::CCSize(&v70, v16); v17 = v13->setPosition; v18 = (__int64)v2->getPosition(v2); cocos2d::CCPoint::CCPoint(&v71, (float)(v15 * v70.width) + 10.0, v15 * (float)(v70.height * -0.5)); cocos2d::CCPoint::operator+(&v72, v18, &v71); v17(v13, (const cocos2d::CCPoint *)&v72); } v19 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"View", (const char *)&dword_30 + 2, 0, 0, 0.6, "bigFont.fnt", "GJ_button_01.png", v10, 30.0); v74.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v74.adj = (size_t)LevelCell::onClick; v20 = CCMenuItemSpriteExtra::create(v19, nullptr, v74); if ( a1->m_level->m_localOrSaved ) v21 = 1.0; else v21 = 1.5; CCMenuItemSpriteExtra::setSizeMult(v20, v21); a1->m_mainMenu->addChild(a1->m_mainMenu, v20); m_width = a1->m_width; v23 = (float *)v19->getContentSize(v19); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, (float)(m_width - (float)(*v23 * 0.5)) - 9.0, a1->m_height * 0.5); cocos2d::CCPoint::operator=(&a1->m_point, v24, v25); v26 = v20->setPosition; v73 = cocos2d::CCNode::convertToNodeSpace(a1->m_mainMenu, &a1->m_point); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCLabelBMFont **, float, float))v26)(v20, &v72, v73.x, v73.y); v69 = v2->getPosition(v2)->x + 9.0; v27 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v27); v28 = v27->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, v69, 20.0); v28(v27, (const cocos2d::CCPoint *)&v72); v27->setScale(v27, 0.7); GJGameLevel::lengthKeyToString((__int64 *)&v72, (GJGameLevel *)(unsigned int)a1->m_level->m_levelLength, v29); v30 = cocos2d::CCLabelBMFont::create(); v31 = &v72[-1].m_pTargetArray; if ( &v72[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v63 = (unsigned int *)&v72[-1].m_nExtraKerning; do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = v72[-1].m_nExtraKerning; v72[-1].m_nExtraKerning = v64 - 1; } if ( v64 <= 0 ) operator delete(v31); } a1->m_mainLayer->addChild(a1->m_mainLayer, v30); v32 = v30->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, 0.0, 0.5); v32(v30, (const cocos2d::CCPoint *)&v72); v33 = v27; getPosition = v27->getPosition; v35 = v30->setPosition; v36 = (__int64)getPosition(v33); cocos2d::CCPoint::CCPoint(&v71, 9.0, 0.0); cocos2d::CCPoint::operator+(&v72, v36, &v71); v35(v30, (const cocos2d::CCPoint *)&v72); v37 = v30->setScale; if ( (float)(100.0 / v30->getContentSize(v30)->width) <= 0.4 ) ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v30->getContentSize)(v30, 0.4); ((void (__fastcall *)(cocos2d::CCLabelBMFont *))v37)(v30); v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_noteIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v38); v39 = v38->setPosition; v40 = (__int64)v30->getPosition(v30); v41 = v30->getContentSize(v30)->width; v42 = v30->getScale(v30); cocos2d::CCPoint::CCPoint(&v71, (float)(v41 * v42) + 17.0, 0.0); cocos2d::CCPoint::operator+(&v72, v40, &v71); v39(v38, (const cocos2d::CCPoint *)&v72); v38->setScale(v38, 0.7); GJGameLevel::getSongName((__int64 *)&v72, a1->m_level); v43 = cocos2d::CCLabelBMFont::create(); v44 = &v72[-1].m_pTargetArray; if ( &v72[-1].m_pTargetArray != (cocos2d::CCArray **)&qword_124B6B0 ) { if ( &pthread_create ) { v65 = (unsigned int *)&v72[-1].m_nExtraKerning; do v66 = __ldaxr(v65); while ( __stlxr(v66 - 1, v65) ); } else { v66 = v72[-1].m_nExtraKerning; v72[-1].m_nExtraKerning = v66 - 1; } if ( v66 <= 0 ) operator delete(v44); } a1->m_mainLayer->addChild(a1->m_mainLayer, v43); v45 = v43->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, 0.0, 0.5); v45(v43, (const cocos2d::CCPoint *)&v72); v46 = v43->setPosition; v47 = (__int64)v38->getPosition(v38); cocos2d::CCPoint::CCPoint(&v71, 9.0, 0.0); cocos2d::CCPoint::operator+(&v72, v47, &v71); v46(v43, (const cocos2d::CCPoint *)&v72); v48 = v43->setScale; if ( (float)(100.0 / v43->getContentSize(v43)->width) <= 0.4 ) ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v43->getContentSize)(v43, 0.4); ((void (__fastcall *)(cocos2d::CCLabelBMFont *))v48)(v43); v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v49); v50 = v49->setPosition; v51 = (__int64)v43->getPosition(v43); v52 = v43->getContentSize(v43)->width; v53 = v43->getScale(v43); cocos2d::CCPoint::CCPoint(&v71, (float)(v52 * v53) + 17.0, 0.0); cocos2d::CCPoint::operator+(&v72, v51, &v71); v50(v49, (const cocos2d::CCPoint *)&v72); v49->setScale(v49, 0.7); v54 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v54); v55 = v54->setAnchorPoint; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v72, 0.0, 0.5); v55(v54, (const cocos2d::CCPoint *)&v72); v56 = v54->setPosition; v57 = (__int64)v49->getPosition(v49); cocos2d::CCPoint::CCPoint(&v71, 9.0, 0.0); cocos2d::CCPoint::operator+(&v72, v57, &v71); v56(v54, (const cocos2d::CCPoint *)&v72); v58 = v54->setScale; v59 = (float *)v54->getContentSize(v54); LODWORD(v60) = 1053609165; if ( (float)(60.0 / *v59) <= 0.4 ) *(float *)&v60 = 60.0 / *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, float))v54->getContentSize)(v54, 0.4); v58(v54, v60); }
GD Web Decomp Icon

GD Web Decomp

Raw Source