// // OptionsLayer::customSetup from 0x7c8188 to 0x7c8b64 (2524 bytes) // // 2 xrefs: // > @ 0x96948 // > @ 0x117d468 // // 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; // x0 bool v3; // w4 __int64 v4; // x5 const char *v5; // x6 cocos2d::CCNode *v6; // x0 CCMenuItemSpriteExtra *v7; // x28 bool v8; // w4 __int64 v9; // x5 const char *v10; // x6 cocos2d::CCNode *v11; // x0 CCMenuItemSpriteExtra *v12; // x27 bool v13; // w4 __int64 v14; // x5 const char *v15; // x6 cocos2d::CCNode *v16; // x0 CCMenuItemSpriteExtra *v17; // x26 bool v18; // w4 __int64 v19; // x5 const char *v20; // x6 cocos2d::CCNode *v21; // x0 CCMenuItemSpriteExtra *v22; // x25 bool v23; // w4 __int64 v24; // x5 const char *v25; // x6 cocos2d::CCNode *v26; // x0 CCMenuItemSpriteExtra *v27; // x24 bool v28; // w4 __int64 v29; // x5 const char *v30; // x6 cocos2d::CCNode *v31; // x0 CCMenuItemSpriteExtra *v32; // x23 void (__fastcall *v33)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 void (__fastcall *v34)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 void (__fastcall *v37)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 cocos2d::CCMenu *v38; // x22 GameStatsManager *v39; // x0 _BOOL4 v40; // w25 const char *v41; // x0 cocos2d::CCSprite *v42; // x26 CCMenuItemSpriteExtra *v43; // x24 void (__fastcall *v44)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCLabelBMFont *v45; // x24 void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 Slider *v47; // x0 Slider *m_musicSlider; // x26 void (__fastcall *v49)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 __int64 v50; // x28 Slider *v51; // x26 FMODAudioEngine *v52; // x0 float BackgroundMusicVolume; // s0 cocos2d::CCLabelBMFont *v54; // x25 void (__fastcall *v55)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 __int64 v56; // x27 Slider *v57; // x0 Slider *m_sfxSlider; // x26 cocos2d::CCLabelBMFont *v59; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v61)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 __int64 v62; // x27 Slider *v63; // x25 FMODAudioEngine *v64; // x0 float EffectsVolume; // s0 GameManager *v66; // x0 bool GameVariable; // w0 cocos2d::CCLabelBMFont_vtbl *v68; // x1 bool v69; // w2 cocos2d::CCLabelBMFont *v70; // x0 __int64 v71; // x28 cocos2d::CCLayer *m_mainLayer; // x27 void *v73; // x0 __int64 v74; // x0 cocos2d::CCSprite *v75; // x25 void (__fastcall *v76)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v77; // x25 void (__fastcall *v78)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 unsigned int *v79; // x2 int v80; // w1 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+A0h] [xbp+70h] float v82; // [xsp+A0h] [xbp+70h] float v83; // [xsp+C0h] [xbp+90h] float v84; // [xsp+C4h] [xbp+94h] cocos2d::CCPoint v85; // [xsp+C8h] [xbp+98h] BYREF char v86[8]; // [xsp+D0h] [xbp+A0h] BYREF cocos2d::CCPoint v87; // [xsp+D8h] [xbp+A8h] BYREF cocos2d::CCPoint v88; // [xsp+E0h] [xbp+B0h] BYREF cocos2d::CCPoint v89; // [xsp+E8h] [xbp+B8h] BYREF cocos2d::CCPoint v90; // [xsp+F0h] [xbp+C0h] BYREF cocos2d::CCPoint v91; // 0:kr10_8.8 cocos2d::SEL_MenuHandler v92; // 0:x1.16 cocos2d::SEL_MenuHandler v93; // 0:x1.16 cocos2d::SEL_MenuHandler v94; // 0:x2.16 cocos2d::SEL_MenuHandler v95; // 0:x2.16 cocos2d::SEL_MenuHandler v96; // 0:x2.16 cocos2d::SEL_MenuHandler v97; // 0:x2.16 cocos2d::SEL_MenuHandler v98; // 0:x2.16 cocos2d::SEL_MenuHandler v99; // 0:x2.16 cocos2d::SEL_MenuHandler v100; // 0:x2.16 v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v2); a1->m_optionsMenu = cocos2d::CCMenu::create(); cocos2d::CCPoint::CCPoint(&v85, v83 * 0.5, (float)(v84 * 0.5) + 80.0); cocos2d::CCNode::convertToNodeSpace(a1->m_optionsMenu, &v85); v6 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Account", (const char *)&qword_80 + 2, 0, 1, 1.0, v3, v4, v5); v94.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v94.adj = (size_t)OptionsLayer::onAccount; v7 = CCMenuItemSpriteExtra::create(v6, nullptr, v94); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v7); v11 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"How To Play", (const char *)&qword_80 + 2, 0, 1, 1.0, v8, v9, v10); v95.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v95.adj = (size_t)OptionsLayer::onHelp; v12 = CCMenuItemSpriteExtra::create(v11, nullptr, v95); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v12); v16 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Options", (const char *)&qword_80 + 2, 0, 1, 1.0, v13, v14, v15); v96.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v96.adj = (size_t)OptionsLayer::onOptions; v17 = CCMenuItemSpriteExtra::create(v16, nullptr, v96); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v17); v21 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Rate", (const char *)&qword_48 + 6, 0, 1, 1.0, v18, v19, v20); v97.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v97.adj = (size_t)OptionsLayer::onRate; v22 = CCMenuItemSpriteExtra::create(v21, nullptr, v97); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v22); v26 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Songs", (const char *)&qword_48 + 6, 0, 1, 1.0, v23, v24, v25); v98.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v98.adj = (size_t)OptionsLayer::onSoundtracks; v27 = CCMenuItemSpriteExtra::create(v26, nullptr, v98); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v27); v31 = (cocos2d::CCNode *)ButtonSprite::create( (ButtonSprite *)"Help", (const char *)&qword_48 + 6, 0, 1, 1.0, v28, v29, v30); v99.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v99.adj = (size_t)OptionsLayer::onSupport; v32 = CCMenuItemSpriteExtra::create(v31, nullptr, v99); a1->m_optionsMenu->addChild(a1->m_optionsMenu, v32); setPosition = v7->setPosition; cocos2d::CCPoint::CCPoint(&v89, -79.0, 0.0); cocos2d::CCPoint::operator+(&v90, v86, &v89); setPosition(v7, &v90); v33 = v12->setPosition; cocos2d::CCPoint::CCPoint(&v89, 79.0, 0.0); cocos2d::CCPoint::operator+(&v90, v86, &v89); v33(v12, &v90); v34 = v17->setPosition; cocos2d::CCPoint::CCPoint(&v89, 0.0, -80.0); cocos2d::CCPoint::operator+(&v90, v86, &v89); v34(v17, &v90); v35 = v22->setPosition; cocos2d::CCPoint::CCPoint(&v89, -105.0, -40.0); cocos2d::CCPoint::operator+(&v90, v86, &v89); v35(v22, &v90); v36 = v27->setPosition; cocos2d::CCPoint::CCPoint(&v89, 0.0, -40.0); cocos2d::CCPoint::operator+(&v90, v86, &v89); v36(v27, &v90); v37 = v32->setPosition; cocos2d::CCPoint::CCPoint(&v89, 105.0, -40.0); cocos2d::CCPoint::operator+(&v90, v86, &v89); v37(v32, &v90); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_optionsMenu, 1); v38 = cocos2d::CCMenu::create(); v39 = GameStatsManager::sharedState(); v40 = GameStatsManager::getStat(v39, "12") > 9; if ( v40 ) v41 = "GJ_lock_open_001.png"; else v41 = "GJ_lockGray_001.png"; v42 = cocos2d::CCSprite::createWithSpriteFrameName(v41); v100.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v100.adj = (size_t)OptionsLayer::onSecretVault; v43 = CCMenuItemSpriteExtra::create(v42, nullptr, v100); v38->addChild(v38, v43); v44 = v43->setPosition; cocos2d::CCPoint::CCPoint(&v89, v83 - 20.0, v84 - 18.0); v91 = cocos2d::CCNode::convertToNodeSpace(v38, &v89); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v44)(v43, &v90, v91.x, v91.y); if ( !v40 ) { v82 = v43->getContentSize(v43)->width * 0.5; v74 = (__int64)v43->getContentSize(v43); cocos2d::CCPoint::CCPoint(&v88, v82, (float)(*(float *)(v74 + 4) * 0.5) + -21.0); v75 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon2_001.png"); v42->addChild(v42, v75); v76 = v75->setPosition; cocos2d::CCPoint::CCPoint(&v89, 7.5, 0.0); cocos2d::CCPoint::operator+(&v90, &v88, &v89); v76(v75, &v90); v75->setScale(v75, 0.5); v77 = cocos2d::CCLabelBMFont::create(); v42->addChild(v42, v77); v78 = v77->setPosition; cocos2d::CCPoint::CCPoint(&v89, -7.5, 0.0); cocos2d::CCPoint::operator+(&v90, &v88, &v89); v78(v77, &v90); v77->setScale(v77, 0.4); } CCMenuItemSpriteExtra::setSizeMult(v43, 1.5); v45 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v45); v46 = v45->setPosition; cocos2d::CCPoint::CCPoint(&v90, v83 * 0.5, (float)(v84 * 0.5) + -34.0); v46(v45, &v90); v45->setScale(v45, 0.6); v92.adj = 0; v92.ptr = (void (__cdecl *)(cocos2d::CCObject *))OptionsLayer::musicSliderChanged; v47 = Slider::create(a1, v92); a1->m_musicSlider = v47; Slider::setBarVisibility(v47, 1); a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_musicSlider); m_musicSlider = a1->m_musicSlider; v49 = m_musicSlider->setPosition; v50 = (__int64)v45->getPosition(v45); cocos2d::CCPoint::CCPoint(&v89, 0.0, -20.0); cocos2d::CCPoint::operator+(&v90, v50, &v89); v49(m_musicSlider, &v90); a1->m_musicSlider->setTag(a1->m_musicSlider, 0); v51 = a1->m_musicSlider; v52 = FMODAudioEngine::sharedEngine(); BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v52); Slider::setValue(v51, BackgroundMusicVolume); v54 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild(a1->m_mainLayer, v54); v55 = v54->setPosition; v56 = (__int64)v45->getPosition(v45); cocos2d::CCPoint::CCPoint(&v89, 0.0, -40.0); cocos2d::CCPoint::operator+(&v90, v56, &v89); v55(v54, &v90); v54->setScale(v54, 0.6); v93.adj = 0; v93.ptr = (void (__cdecl *)(cocos2d::CCObject *))OptionsLayer::sfxSliderChanged; v57 = Slider::create(a1, v93); a1->m_sfxSlider = v57; Slider::setBarVisibility(v57, 1); a1->m_mainLayer->addChild(a1->m_mainLayer, a1->m_sfxSlider); m_sfxSlider = a1->m_sfxSlider; v59 = v54; getPosition = v54->getPosition; v61 = m_sfxSlider->setPosition; v62 = (__int64)getPosition(v59); cocos2d::CCPoint::CCPoint(&v89, 0.0, -20.0); cocos2d::CCPoint::operator+(&v90, v62, &v89); v61(m_sfxSlider, &v90); a1->m_sfxSlider->setTag(a1->m_sfxSlider, 1); v63 = a1->m_sfxSlider; v64 = FMODAudioEngine::sharedEngine(); EffectsVolume = FMODAudioEngine::getEffectsVolume(v64); Slider::setValue(v63, EffectsVolume); sub_D153B8((int)&v90, "Menu\nMusic"); v66 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v66, "0122"); v68 = v45->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v69 = GameVariable; v70 = v45; LOBYTE(v45) = !v69; v71 = (__int64)v68->getPosition(v70); cocos2d::CCPoint::CCPoint(&v87, 145.0, -35.0); cocos2d::CCPoint::operator+(&v88, v71, &v87); m_mainLayer = a1->m_mainLayer; cocos2d::CCPoint::CCPoint(&v89, 0.0, 2.0); GameToolbox::createToggleButton( 0.6, 0.35, 0.0, (__int64)&v90, (void (__cdecl *)(cocos2d::CCObject *))OptionsLayer::onMenuMusic, 0, (bool)v45, v38, &v88, a1, m_mainLayer, (float *)&v89, (__int64)"bigFont.fnt", 1, 0, nullptr); v73 = (void *)(*(_QWORD *)&v90 - 24LL); if ( (__int64 *)(*(_QWORD *)&v90 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v79 = (unsigned int *)(*(_QWORD *)&v90 - 8LL); do v80 = __ldaxr(v79); while ( __stlxr(v80 - 1, v79) ); } else { v80 = *(_DWORD *)(*(_QWORD *)&v90 - 8LL); *(_DWORD *)(*(_QWORD *)&v90 - 8LL) = v80 - 1; } if ( v80 <= 0 ) operator delete(v73); } a1->m_mainLayer->addChild(a1->m_mainLayer, v38); }
GD Web Decomp Icon

GD Web Decomp

Raw Source