// // LevelCell::loadLocalLevelCell from 0x331518 to 0x331b84 (1644 bytes) // // 1 xrefs: // > LevelCell::loadFromLevel @ 0x33374a // // 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; // r5 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // r7 float *v6; // r0 void (__fastcall *v7)(cocos2d::CCLabelBMFont *__hidden, float); // r7 int v8; // r1 const char *m_levelRev; // r1 cocos2d::CCString *v10; // r0 cocos2d::CCLabelBMFont *v11; // r9 void (__fastcall *v12)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10 float v13; // s17 const cocos2d::CCSize *v14; // r0 int v15; // r11 ButtonSprite *v16; // r0 ButtonSprite *v17; // r4 CCMenuItemSpriteExtra *v18; // r0 float v19; // r1 cocos2d::CCNode *v20; // r11 float m_width; // s17 float *v22; // r0 float x; // s16 cocos2d::CCSprite *v24; // r9 void (__fastcall *v25)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r5 cocos2d::CCLabelBMFont *v26; // r5 void (__fastcall *v27)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v28)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v29; // r9 void (__fastcall *v30)(cocos2d::CCLabelBMFont *__hidden, float); // r9 float v31; // s15 cocos2d::CCSprite *v32; // r9 void (__fastcall *v33)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 int v34; // r11 float width; // s19 float v36; // r0 cocos2d::CCLabelBMFont *v37; // r5 void (__fastcall *v38)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v40; // r9 void (__fastcall *v41)(cocos2d::CCLabelBMFont *__hidden, float); // r9 float v42; // s15 cocos2d::CCSprite *v43; // r9 void (__fastcall *v44)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r10 int v45; // r11 float v46; // s16 float v47; // r0 cocos2d::CCLabelBMFont *v48; // r5 void (__fastcall *v49)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r6 void (__fastcall *v50)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 int v51; // r9 void (__fastcall *v52)(cocos2d::CCLabelBMFont *__hidden, float); // r4 float v53; // s16 float v54; // [sp+10h] [bp-2Ch] void (__fastcall *v55)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+14h] [bp-28h] void (__fastcall *v56)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+14h] [bp-28h] cocos2d::CCPoint v57; // [sp+1Ch] [bp-20h] BYREF cocos2d::CCPoint v58; // [sp+24h] [bp-18h] BYREF cocos2d::CCPoint v59; // [sp+2Ch] [bp-10h] BYREF sub_775C20(&v59, &a1->m_level->m_levelName); v2 = cocos2d::CCLabelBMFont::create(); sub_774008(&v59); a1->m_mainLayer->addChild(a1->m_mainLayer, v2); setAnchorPoint = v2->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v59, 0.0, 0.5); setAnchorPoint(v2, &v59); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v2->setScale)(v2, 1065353216); setPosition = v2->setPosition; cocos2d::CCPoint::CCPoint(&v59, 12.0, (float)(a1->m_height * 0.5) + 14.0); setPosition(v2, &v59); if ( v2->getContentSize(v2)->width > 200.0 ) { setScale = v2->setScale; v6 = (float *)v2->getContentSize(v2); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))setScale)(v2, 200.0 / *v6); } v7 = v2->setScale; if ( v2->getScale(v2) > 0.8 ) v8 = 1061997773; else v8 = ((int (__fastcall *)(cocos2d::CCLabelBMFont *))v2->getScale)(v2); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v7)(v2, v8); m_levelRev = (const char *)a1->m_level->m_levelRev; if ( (int)m_levelRev > 0 ) { v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Rev. %i", m_levelRev); cocos2d::CCString::getCString(v10); v11 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v11); v12 = v11->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v59, 0.0, 0.0); v12(v11, &v59); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v11->setScale)(v11, 1053609165); v13 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLabelBMFont *))v2->getScale)(v2)); v14 = v2->getContentSize(v2); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v57, v14); v55 = v11->setPosition; v15 = (int)v2->getPosition(v2); cocos2d::CCPoint::CCPoint(&v58, (float)(v13 * v57.x) + 10.0, (float)-(float)(0.5 * v57.y) * v13); cocos2d::CCPoint::operator+(&v59, v15, &v58); v55(v11, &v59); } v16 = ButtonSprite::create( (ButtonSprite *)"View", (const char *)&word_32, 0, 0.6, 0, "bigFont.fnt", "GJ_button_01.png", (const char *)0x41F00000, v54); LODWORD(v59.x) = LevelCell::onClick; v59.y = 0.0; v17 = v16; v18 = CCMenuItemSpriteExtra::create( v16, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(LevelCell::onClick, (unsigned int)a1)); if ( a1->m_level->m_localOrSaved ) v19 = 1.0; else v19 = 1.5; v20 = v18; CCMenuItemSpriteExtra::setSizeMult(v18, v19); a1->m_mainMenu->addChild(a1->m_mainMenu, v20); m_width = a1->m_width; v22 = (float *)v17->getContentSize(v17); cocos2d::CCPoint::CCPoint(&v58, (float)(m_width - (float)(*v22 * 0.5)) - 9.0, a1->m_height * 0.5); cocos2d::CCPoint::operator=(&a1->m_point, &v58); v56 = v20->setPosition; cocos2d::CCNode::convertToNodeSpace(&v58, a1->m_mainMenu, &a1->m_point); v56(v20, &v58); x = v2->getPosition(v2)->x; v24 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v24); v25 = v24->setPosition; cocos2d::CCPoint::CCPoint(&v58, x + 9.0, 20.0); v25(v24, &v58); ((void (__fastcall *)(cocos2d::CCSprite *, int))v24->setScale)(v24, 1060320051); GJGameLevel::lengthKeyToString((GJGameLevel *)&v58, a1->m_level->m_levelLength); v26 = cocos2d::CCLabelBMFont::create(); sub_774008(&v58); a1->m_mainLayer->addChild(a1->m_mainLayer, v26); v27 = v26->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v58, 0.0, 0.5); v27(v26, &v58); v28 = v26->setPosition; v29 = (int)v24->getPosition(v24); cocos2d::CCPoint::CCPoint(&v57, 9.0, 0.0); cocos2d::CCPoint::operator+(&v58, v29, &v57); v28(v26, &v58); v30 = v26->setScale; if ( (float)(100.0 / v26->getContentSize(v26)->width) > 0.4 ) v31 = 0.4; else v31 = 100.0 / v26->getContentSize(v26)->width; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v30)(v26, LODWORD(v31)); v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_noteIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v32); v33 = v32->setPosition; v34 = (int)v26->getPosition(v26); width = v26->getContentSize(v26)->width; v36 = v26->getScale(v26); cocos2d::CCPoint::CCPoint(&v57, (float)(width * v36) + 17.0, 0.0); cocos2d::CCPoint::operator+(&v58, v34, &v57); v33(v32, &v58); ((void (__fastcall *)(cocos2d::CCSprite *, int))v32->setScale)(v32, 1060320051); GJGameLevel::getSongName((GJGameLevel *)&v58); v37 = cocos2d::CCLabelBMFont::create(); sub_774008(&v58); a1->m_mainLayer->addChild(a1->m_mainLayer, v37); v38 = v37->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v58, 0.0, 0.5); v38(v37, &v58); v39 = v37->setPosition; v40 = (int)v32->getPosition(v32); cocos2d::CCPoint::CCPoint(&v57, 9.0, 0.0); cocos2d::CCPoint::operator+(&v58, v40, &v57); v39(v37, &v58); v41 = v37->setScale; if ( (float)(100.0 / v37->getContentSize(v37)->width) > 0.4 ) v42 = 0.4; else v42 = 100.0 / v37->getContentSize(v37)->width; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v41)(v37, LODWORD(v42)); v43 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v43); v44 = v43->setPosition; v45 = (int)v37->getPosition(v37); v46 = v37->getContentSize(v37)->width; v47 = v37->getScale(v37); cocos2d::CCPoint::CCPoint(&v57, (float)(v46 * v47) + 17.0, 0.0); cocos2d::CCPoint::operator+(&v58, v45, &v57); v44(v43, &v58); ((void (__fastcall *)(cocos2d::CCSprite *, int))v43->setScale)(v43, 1060320051); v48 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v48); v49 = v48->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v58, 0.0, 0.5); v49(v48, &v58); v50 = v48->setPosition; v51 = (int)v43->getPosition(v43); cocos2d::CCPoint::CCPoint(&v57, 9.0, 0.0); cocos2d::CCPoint::operator+(&v58, v51, &v57); v50(v48, &v58); v52 = v48->setScale; if ( (float)(60.0 / v48->getContentSize(v48)->width) > 0.4 ) v53 = 0.4; else v53 = 60.0 / v48->getContentSize(v48)->width; ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v52)(v48, LODWORD(v53)); }
GD Web Decomp Icon

GD Web Decomp

Raw Source