// // OptionsLayer::customSetup from 0x4210d0 to 0x4217d8 (1800 bytes) // // 0 xrefs: // // 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 OptionsLayer::customSetup(OptionsLayer *a1) { cocos2d::CCDirector *v2; // r0 cocos2d::CCMenu *v3; // r0 float v4; // r1 float v5; // s15 ButtonSprite *v6; // r0 CCMenuItemSpriteExtra *v7; // r11 ButtonSprite *v8; // r0 CCMenuItemSpriteExtra *v9; // r10 ButtonSprite *v10; // r0 ButtonSprite *v11; // r0 ButtonSprite *v12; // r0 ButtonSprite *v13; // r0 void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 void (__fastcall *v15)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v17)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 void (__fastcall *v18)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 GameStatsManager *v19; // r0 int Stat; // r0 _BOOL4 v21; // r9 const char *v22; // r0 cocos2d::CCSprite *v23; // r0 cocos2d::CCSprite *v24; // r11 CCMenuItemSpriteExtra *v25; // r6 void (__fastcall *v26)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 float width; // s17 int v28; // r0 cocos2d::CCSprite *v29; // r9 cocos2d::CCLabelBMFont *v30; // r9 void (__fastcall *v31)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCLabelBMFont *v32; // r9 void (__fastcall *v33)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 Slider *v34; // r0 Slider *m_musicSlider; // r11 Slider *v36; // r11 FMODAudioEngine *v37; // r0 float BackgroundMusicVolume; // r0 cocos2d::CCLabelBMFont *v39; // r7 int v40; // r11 Slider *v41; // r0 Slider *m_sfxSlider; // r11 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 Slider *v44; // r6 FMODAudioEngine *v45; // r0 float EffectsVolume; // r0 GameManager *v47; // r0 bool v48; // r8 int v49; // r11 cocos2d::CCLayer *m_mainLayer; // r10 bool v51; // [sp+4h] [bp-D8h] bool v52; // [sp+4h] [bp-D8h] bool v53; // [sp+4h] [bp-D8h] bool v54; // [sp+4h] [bp-D8h] bool v55; // [sp+4h] [bp-D8h] bool v56; // [sp+4h] [bp-D8h] CCMenuItemSpriteExtra *v57; // [sp+30h] [bp-ACh] cocos2d::CCMenu *v58; // [sp+30h] [bp-ACh] CCMenuItemSpriteExtra *v59; // [sp+34h] [bp-A8h] void (__fastcall *v60)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [sp+34h] [bp-A8h] void (__fastcall *v61)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+34h] [bp-A8h] void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+34h] [bp-A8h] int v63; // [sp+34h] [bp-A8h] CCMenuItemSpriteExtra *v64; // [sp+38h] [bp-A4h] int v65; // [sp+3Ch] [bp-A0h] void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+40h] [bp-9Ch] CCMenuItemSpriteExtra *v67; // [sp+44h] [bp-98h] char v68[4]; // [sp+50h] [bp-8Ch] BYREF cocos2d::CCSize v69; // [sp+54h] [bp-88h] BYREF cocos2d::CCPoint v70; // [sp+5Ch] [bp-80h] BYREF cocos2d::CCPoint v71; // [sp+64h] [bp-78h] BYREF cocos2d::CCPoint v72; // [sp+6Ch] [bp-70h] BYREF cocos2d::CCPoint v73; // [sp+74h] [bp-68h] BYREF cocos2d::CCPoint v74; // [sp+7Ch] [bp-60h] BYREF void (*v75)(OptionsLayer *, cocos2d::CCObject *); // [sp+84h] [bp-58h] int v76; // [sp+88h] [bp-54h] void (*v77)(OptionsLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-50h] int v78; // [sp+90h] [bp-4Ch] void (*v79)(OptionsLayer *, cocos2d::CCObject *); // [sp+94h] [bp-48h] int v80; // [sp+98h] [bp-44h] void (*v81)(OptionsLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-40h] int v82; // [sp+A0h] [bp-3Ch] void (*v83)(OptionsLayer *, cocos2d::CCObject *); // [sp+A4h] [bp-38h] int v84; // [sp+A8h] [bp-34h] void (*v85)(OptionsLayer *, cocos2d::CCObject *); // [sp+ACh] [bp-30h] int v86; // [sp+B0h] [bp-2Ch] void (*v87)(OptionsLayer *, cocos2d::CCObject *); // [sp+B4h] [bp-28h] int v88; // [sp+B8h] [bp-24h] cocos2d::CCPoint v89; // [sp+BCh] [bp-20h] BYREF cocos2d::CCPoint v90; // [sp+C4h] [bp-18h] BYREF cocos2d::CCPoint v91; // [sp+CCh] [bp-10h] BYREF v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v69, v2); v3 = cocos2d::CCMenu::create(); v4 = v69.width * 0.5; v5 = (float)(v69.height * 0.5) + 80.0; a1->m_optionsMenu = v3; cocos2d::CCPoint::CCPoint(&v70, v4, v5); cocos2d::CCNode::convertToNodeSpace(&v71, a1->m_optionsMenu, &v70); v6 = ButtonSprite::create((ButtonSprite *)"Account", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v51); v76 = 0; v75 = OptionsLayer::onAccount; v7 = CCMenuItemSpriteExtra::create( v6, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onAccount, (unsigned int)a1)); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v7); v8 = ButtonSprite::create((ButtonSprite *)"How To Play", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v52); v78 = 0; v77 = OptionsLayer::onHelp; v9 = CCMenuItemSpriteExtra::create( v8, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onHelp, (unsigned int)a1)); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v9); v10 = ButtonSprite::create((ButtonSprite *)"Options", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v53); v80 = 0; v79 = OptionsLayer::onOptions; v57 = CCMenuItemSpriteExtra::create( v10, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onOptions, (unsigned int)a1)); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v57); v11 = ButtonSprite::create((ButtonSprite *)"Rate", (const char *)&dword_4C + 2, 0, 1.0, COERCE_FLOAT(1), v54); v82 = 0; v81 = OptionsLayer::onRate; v59 = CCMenuItemSpriteExtra::create( v11, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onRate, (unsigned int)a1)); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v59); v12 = ButtonSprite::create((ButtonSprite *)"Songs", (const char *)&dword_4C + 2, 0, 1.0, COERCE_FLOAT(1), v55); v84 = 0; v83 = OptionsLayer::onSoundtracks; v64 = CCMenuItemSpriteExtra::create( v12, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onSoundtracks, (unsigned int)a1)); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v64); v13 = ButtonSprite::create((ButtonSprite *)"Help", (const char *)&dword_4C + 2, 0, 1.0, COERCE_FLOAT(1), v56); v86 = 0; v85 = OptionsLayer::onSupport; v67 = CCMenuItemSpriteExtra::create( v13, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onSupport, (unsigned int)a1)); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v67); setPosition = v7->setPosition; cocos2d::CCPoint::CCPoint(&v90, -79.0, 0.0); cocos2d::CCPoint::operator+(&v91, &v71, &v90); setPosition(v7, &v91); v14 = v9->setPosition; cocos2d::CCPoint::CCPoint(&v90, 79.0, 0.0); cocos2d::CCPoint::operator+(&v91, &v71, &v90); v14(v9, &v91); v15 = v57->setPosition; cocos2d::CCPoint::CCPoint(&v90, 0.0, -80.0); cocos2d::CCPoint::operator+(&v91, &v71, &v90); v15(v57, &v91); v16 = v59->setPosition; cocos2d::CCPoint::CCPoint(&v90, -105.0, -40.0); cocos2d::CCPoint::operator+(&v91, &v71, &v90); v16(v59, &v91); v17 = v64->setPosition; cocos2d::CCPoint::CCPoint(&v90, 0.0, -40.0); cocos2d::CCPoint::operator+(&v91, &v71, &v90); v17(v64, &v91); v18 = v67->setPosition; cocos2d::CCPoint::CCPoint(&v90, 105.0, -40.0); cocos2d::CCPoint::operator+(&v91, &v71, &v90); v18(v67, &v91); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_optionsMenu, 1); v58 = cocos2d::CCMenu::create(); v19 = GameStatsManager::sharedState(); Stat = GameStatsManager::getStat(v19, "12"); v21 = Stat > 9; if ( Stat > 9 ) v22 = "GJ_lock_open_001.png"; else v22 = "GJ_lockGray_001.png"; v23 = cocos2d::CCSprite::createWithSpriteFrameName(v22); v88 = 0; v87 = OptionsLayer::onSecretVault; v24 = v23; v25 = CCMenuItemSpriteExtra::create( v23, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(OptionsLayer::onSecretVault, (unsigned int)a1)); v58->addChild(v58, v25); v26 = v25->setPosition; cocos2d::CCPoint::CCPoint(&v90, v69.width - 20.0, v69.height - 18.0); cocos2d::CCNode::convertToNodeSpace(&v91, v58, &v90); v26(v25, &v91); if ( !v21 ) { width = v25->getContentSize(v25)->width; v28 = (int)v25->getContentSize(v25); cocos2d::CCPoint::CCPoint(&v89, width * 0.5, (float)(*(float *)(v28 + 4) * 0.5) - 21.0); v29 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon2_001.png"); v24->addChild(v24, v29); v60 = v29->setPosition; cocos2d::CCPoint::CCPoint(&v90, 7.5, 0.0); cocos2d::CCPoint::operator+(&v91, &v89, &v90); v60(v29, &v91); ((void (__fastcall *)(cocos2d::CCSprite *, int))v29->setScale)(v29, 1056964608); v30 = cocos2d::CCLabelBMFont::create(); v24->addChild(v24, v30); v31 = v30->setPosition; cocos2d::CCPoint::CCPoint(&v90, -7.5, 0.0); cocos2d::CCPoint::operator+(&v91, &v89, &v90); v31(v30, &v91); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v30->setScale)(v30, 1053609165); } CCMenuItemSpriteExtra::setSizeMult(v25, 1.5); v32 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v32); v33 = v32->setPosition; cocos2d::CCPoint::CCPoint(&v91, v69.width * 0.5, (float)(v69.height * 0.5) - 34.0); v33(v32, &v91); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v32->setScale)(v32, 1058642330); v89.y = 0.0; LODWORD(v89.x) = OptionsLayer::musicSliderChanged; v34 = Slider::create(a1, (cocos2d::SEL_MenuHandler)(unsigned int)OptionsLayer::musicSliderChanged); a1->m_musicSlider = v34; Slider::setBarVisibility(v34, 1); a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_musicSlider); m_musicSlider = a1->m_musicSlider; v61 = m_musicSlider->setPosition; v65 = (int)v32->getPosition(v32); cocos2d::CCPoint::CCPoint(&v90, 0.0, -20.0); cocos2d::CCPoint::operator+(&v91, v65, &v90); v61(m_musicSlider, &v91); a1->m_musicSlider->setTag(a1->m_musicSlider, 0); v36 = a1->m_musicSlider; v37 = FMODAudioEngine::sharedEngine(); BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v37); Slider::setValue(v36, BackgroundMusicVolume); v39 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v39); v62 = v39->setPosition; v40 = (int)v32->getPosition(v32); cocos2d::CCPoint::CCPoint(&v90, 0.0, -40.0); cocos2d::CCPoint::operator+(&v91, v40, &v90); v62(v39, &v91); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v39->setScale)(v39, 1058642330); v90.y = 0.0; LODWORD(v90.x) = OptionsLayer::sfxSliderChanged; v41 = Slider::create(a1, (cocos2d::SEL_MenuHandler)(unsigned int)OptionsLayer::sfxSliderChanged); a1->m_sfxSlider = v41; Slider::setBarVisibility(v41, 1); a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_sfxSlider); m_sfxSlider = a1->m_sfxSlider; v43 = m_sfxSlider->setPosition; v63 = (int)v39->getPosition(v39); cocos2d::CCPoint::CCPoint(&v74, 0.0, -20.0); cocos2d::CCPoint::operator+(&v91, v63, &v74); v43(m_sfxSlider, &v91); a1->m_sfxSlider->setTag(a1->m_sfxSlider, 1); v44 = a1->m_sfxSlider; v45 = FMODAudioEngine::sharedEngine(); EffectsVolume = FMODAudioEngine::getEffectsVolume(v45); Slider::setValue(v44, EffectsVolume); sub_776584((int)v68, "Menu\nMusic"); v91.y = 0.0; LODWORD(v91.x) = OptionsLayer::onMenuMusic; v47 = GameManager::sharedState(); v48 = !GameManager::getGameVariable(v47, "0122"); v49 = (int)v32->getPosition(v32); cocos2d::CCPoint::CCPoint(&v72, 145.0, -35.0); cocos2d::CCPoint::operator+(&v73, v49, &v72); m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v74, 0.0, 2.0); GameToolbox::createToggleButton( (int)v68, LODWORD(v91.x), LODWORD(v91.y), v48, v58, &v73, a1, m_mainLayer, 0.6, 0.35, 0.0, (int)&v74, (int)"bigFont.fnt", 1, 0, nullptr); sub_774008(v68); a1->m_mainLayer->addChild(a1->m_mainLayer, v58); }
GD Web Decomp Icon

GD Web Decomp

Raw Source