// // OptionsLayer::customSetup from 0x5303f0 to 0x530be4 (2036 bytes) // // 0 xrefs: // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:52:04 +0000 // int __fastcall OptionsLayer::customSetup(const cocos2d::CCPoint **this) { cocos2d::CCMenu *WinSize; // r0 const cocos2d::CCPoint *v3; // r0 float v4; // r1 float v5; // s15 ButtonSprite *v6; // r0 int v7; // r9 ButtonSprite *v8; // r0 int v9; // r8 ButtonSprite *v10; // r0 ButtonSprite *v11; // r0 ButtonSprite *v12; // r0 ButtonSprite *v13; // r0 ButtonSprite *v14; // r0 void (__fastcall *v15)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r9 void (__fastcall *v16)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r8 void (__fastcall *v17)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r8 void (__fastcall *v18)(Slider *, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r8 void (__fastcall *v19)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r8 void (__fastcall *v20)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r8 cocos2d::CCMenu *v21; // r0 GameStatsManager *v22; // r5 GameStatsManager *v23; // r0 int Stat; // r0 const char *v25; // r1 _BOOL4 v26; // r8 char *v27; // r0 int v28; // r0 int v29; // r9 int v30; // r6 float v31; // s17 int v32; // r0 const char *v33; // r1 int v34; // r8 const char *v35; // r2 int v36; // r8 void (__fastcall *v37)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r9 const char *v38; // r2 int v39; // r9 void (__fastcall *v40)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // r6 Slider *v41; // r0 FMODAudioEngine *v42; // r0 FMODAudioEngine *v43; // r0 int BackgroundMusicVolume; // r0 const char *v45; // r2 int v46; // r7 Slider *v47; // r0 int v48; // r6 FMODAudioEngine *v49; // r0 Slider *v50; // r6 FMODAudioEngine *v51; // r0 int EffectsVolume; // r0 GameManager *v53; // r0 int v54; // r0 GameManager *v55; // r0 GameManager *v56; // r0 int v57; // r8 int v58; // r10 bool v60; // [sp+4h] [bp-5Ch] bool v61; // [sp+4h] [bp-5Ch] bool v62; // [sp+4h] [bp-5Ch] bool v63; // [sp+4h] [bp-5Ch] bool v64; // [sp+4h] [bp-5Ch] bool v65; // [sp+4h] [bp-5Ch] bool v66; // [sp+4h] [bp-5Ch] Slider *v67; // [sp+34h] [bp-2Ch] Slider *v68; // [sp+34h] [bp-2Ch] Slider *v69; // [sp+34h] [bp-2Ch] Slider *v70; // [sp+34h] [bp-2Ch] Slider *v71; // [sp+34h] [bp-2Ch] Slider *v72; // [sp+34h] [bp-2Ch] Slider *v73; // [sp+34h] [bp-2Ch] int v74; // [sp+38h] [bp-28h] int v75; // [sp+3Ch] [bp-24h] void (__fastcall *v76)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // [sp+3Ch] [bp-24h] int v77; // [sp+3Ch] [bp-24h] int v78; // [sp+3Ch] [bp-24h] int v79; // [sp+3Ch] [bp-24h] int v80; // [sp+40h] [bp-20h] int v81; // [sp+40h] [bp-20h] void (__fastcall *v82)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)); // [sp+48h] [bp-18h] int v83; // [sp+4Ch] [bp-14h] float v84; // [sp+50h] [bp-10h] BYREF float v85; // [sp+54h] [bp-Ch] _BYTE v86[8]; // [sp+58h] [bp-8h] BYREF _DWORD v87[2]; // [sp+60h] [bp+0h] BYREF _BYTE v88[8]; // [sp+68h] [bp+8h] BYREF _BYTE v89[8]; // [sp+70h] [bp+10h] BYREF _DWORD v90[18]; // [sp+78h] [bp+18h] BYREF _DWORD v91[2]; // [sp+C0h] [bp+60h] BYREF _DWORD v92[2]; // [sp+C8h] [bp+68h] BYREF char **(__fastcall *v93)(OptionsLayer *, cocos2d::CCObject *, int, int); // [sp+D0h] [bp+70h] BYREF int v94; // [sp+D4h] [bp+74h] int v95[3]; // [sp+D8h] [bp+78h] BYREF cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this); WinSize = (cocos2d::CCMenu *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v84); v3 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(WinSize); v4 = v84 * 0.5; v5 = (float)(v85 * 0.5) + 80.0; *(this + 122) = v3; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, v4, v5); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v87, *(this + 122)); v6 = ButtonSprite::create((ButtonSprite *)"Account", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v60); v90[3] = 0; v90[2] = OptionsLayer::onAccount; v7 = CCMenuItemSpriteExtra::create((int)v6, 0, (int)this, (int)OptionsLayer::onAccount, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v7); v8 = ButtonSprite::create((ButtonSprite *)"How To Play", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v61); v90[5] = 0; v90[4] = OptionsLayer::onHelp; v9 = CCMenuItemSpriteExtra::create((int)v8, 0, (int)this, (int)OptionsLayer::onHelp, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v9); v10 = ButtonSprite::create((ButtonSprite *)"Options", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v62); v90[7] = 0; v90[6] = OptionsLayer::onOptions; v83 = CCMenuItemSpriteExtra::create((int)v10, 0, (int)this, (int)OptionsLayer::onOptions, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v83); v11 = ButtonSprite::create((ButtonSprite *)"Rate", (const char *)&dword_4C + 2, 0, 1.0, COERCE_FLOAT(1), v63); v90[9] = 0; v90[8] = OptionsLayer::onRate; v67 = (Slider *)CCMenuItemSpriteExtra::create((int)v11, 0, (int)this, (int)OptionsLayer::onRate, 0); (*(void (__fastcall **)(_DWORD, Slider *))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v67); v12 = ButtonSprite::create((ButtonSprite *)"Songs", (const char *)&dword_4C + 2, 0, 1.0, COERCE_FLOAT(1), v64); v90[11] = 0; v90[10] = OptionsLayer::onSoundtracks; v74 = CCMenuItemSpriteExtra::create((int)v12, 0, (int)this, (int)OptionsLayer::onSoundtracks, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v74); v13 = ButtonSprite::create((ButtonSprite *)"Help", (const char *)&dword_4C + 2, 0, 1.0, COERCE_FLOAT(1), v65); v90[13] = 0; v90[12] = OptionsLayer::onSupport; v75 = CCMenuItemSpriteExtra::create((int)v13, 0, (int)this, (int)OptionsLayer::onSupport, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v75); v14 = ButtonSprite::create((ButtonSprite *)"Parental", (const char *)&dword_80 + 2, 0, 1.0, COERCE_FLOAT(1), v66); v90[15] = 0; v90[14] = OptionsLayer::onParental; v80 = CCMenuItemSpriteExtra::create((int)v14, 0, (int)this, (int)OptionsLayer::onParental, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 122) + 228))(*(this + 122), v80); v82 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v7 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, -79.0, 0.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v82(v7, &v93); v15 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v9 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 79.0, 0.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v15(v9, &v93); v16 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v83 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, -79.0, -80.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v16(v83, &v93); v17 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v80 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 79.0, -80.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v17(v80, &v93); v18 = *(void (__fastcall **)(Slider *, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v67 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, -105.0, -40.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v18(v67, &v93); v19 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v74 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -40.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v19(v74, &v93); v20 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v75 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 105.0, -40.0); cocos2d::CCPoint::operator+(&v93, v87, v92); v20(v75, &v93); v21 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, _DWORD, int))(*(_DWORD *)*(this + 116) + 232))( *(this + 116), *(this + 122), 1); v22 = (GameStatsManager *)cocos2d::CCMenu::create(v21); v23 = (GameStatsManager *)GameStatsManager::sharedState(v22); Stat = GameStatsManager::getStat(v23, "12"); v26 = Stat > 9; if ( Stat > 9 ) v27 = "GJ_lock_open_001.png"; else v27 = "GJ_lockGray_001.png"; v28 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v27, v25); v90[17] = 0; v90[16] = OptionsLayer::onSecretVault; v29 = v28; v30 = CCMenuItemSpriteExtra::create(v28, 0, (int)this, (int)OptionsLayer::onSecretVault, 0); (*(void (__fastcall **)(GameStatsManager *, int))(*(_DWORD *)v22 + 228))(v22, v30); v68 = *(Slider **)(*(_DWORD *)v30 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, v84 - 20.0, v85 - 18.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v93, v22); ((void (__fastcall *)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))v68)(v30, &v93); if ( !v26 ) { v31 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v30 + 164))(v30); v32 = (*(int (__fastcall **)(int))(*(_DWORD *)v30 + 164))(v30); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, v31 * 0.5, (float)(*(float *)(v32 + 4) * 0.5) - 21.0); v34 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_coinsIcon2_001.png", v33); (*(void (__fastcall **)(int, int))(*(_DWORD *)v29 + 228))(v29, v34); v76 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v34 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 7.5, 0.0); cocos2d::CCPoint::operator+(&v93, v91, v92); v76(v34, &v93); (*(void (__fastcall **)(int, int))(*(_DWORD *)v34 + 80))(v34, 1056964608); v36 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"10", "bigFont.fnt", v35); (*(void (__fastcall **)(int, int))(*(_DWORD *)v29 + 228))(v29, v36); v37 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v36 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, -7.5, 0.0); cocos2d::CCPoint::operator+(&v93, v91, v92); v37(v36, &v93); (*(void (__fastcall **)(int, int))(*(_DWORD *)v36 + 80))(v36, 1053609165); } CCMenuItemSpriteExtra::setSizeMult(v30, 1.5); v39 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Music", "bigFont.fnt", v38); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), v39); v40 = *(void (__fastcall **)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))(*(_DWORD *)v39 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v93, v84 * 0.5, (float)(v85 * 0.5) - 34.0); v40(v39, &v93); (*(void (__fastcall **)(int, int))(*(_DWORD *)v39 + 80))(v39, 1058642330); v91[1] = 0; v91[0] = OptionsLayer::musicSliderChanged; v41 = (Slider *)Slider::create((int)this); *(this + 126) = v41; Slider::setBarVisibility(v41, 1); (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), *(this + 126)); v81 = (int)*(this + 126); v69 = *(Slider **)(*(_DWORD *)v81 + 92); v77 = (*(int (__fastcall **)(int))(*(_DWORD *)v39 + 96))(v39); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -20.0); cocos2d::CCPoint::operator+(&v93, v77, v92); ((void (__fastcall *)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))v69)(v81, &v93); v42 = (FMODAudioEngine *)(*(int (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 126) + 36))(*(this + 126), 0); v70 = *(this + 126); v43 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v42); BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v43); Slider::setValue(v70, *(float *)&BackgroundMusicVolume); v46 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"SFX", "bigFont.fnt", v45); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), v46); v71 = *(Slider **)(*(_DWORD *)v46 + 92); v78 = (*(int (__fastcall **)(int))(*(_DWORD *)v39 + 96))(v39); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, -40.0); cocos2d::CCPoint::operator+(&v93, v78, v92); ((void (__fastcall *)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))v71)(v46, &v93); (*(void (__fastcall **)(int, int))(*(_DWORD *)v46 + 80))(v46, 1058642330); v92[1] = 0; v92[0] = OptionsLayer::sfxSliderChanged; v47 = (Slider *)Slider::create((int)this); *(this + 127) = v47; Slider::setBarVisibility(v47, 1); (*(void (__fastcall **)(_DWORD, _DWORD))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), *(this + 127)); v48 = (int)*(this + 127); v72 = *(Slider **)(*(_DWORD *)v48 + 92); v79 = (*(int (__fastcall **)(int))(*(_DWORD *)v46 + 96))(v46); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, 0.0, -20.0); cocos2d::CCPoint::operator+(&v93, v79, v90); ((void (__fastcall *)(int, char **(__fastcall **)(OptionsLayer *, cocos2d::CCObject *, int, int)))v72)(v48, &v93); v49 = (FMODAudioEngine *)(*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 127) + 36))(*(this + 127), 1); v50 = *(this + 127); v51 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v49); EffectsVolume = FMODAudioEngine::getEffectsVolume(v51); v53 = (GameManager *)Slider::setValue(v50, *(float *)&EffectsVolume); v54 = GameManager::sharedState(v53); memset(v95, 0, sizeof(v95)); *(_DWORD *)(v54 + 744) = this + 121; v55 = (GameManager *)std::string::__init(v95, "Menu\nMusic", 0xAu); v94 = 0; v93 = OptionsLayer::onMenuMusic; v56 = (GameManager *)GameManager::sharedState(v55); v57 = (unsigned __int8)GameManager::getGameVariable(v56, "0122") ^ 1; v73 = (Slider *)(*(int (__fastcall **)(int))(*(_DWORD *)v39 + 96))(v39); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, 145.0, -35.0); cocos2d::CCPoint::operator+(v89, v73, v88); v58 = (int)*(this + 116); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, 0.0, 2.0); GameToolbox::createToggleButton( (int)v95, (int)v93, v94, v57, v22, (int)v89, (int)this, v58, 0.6, 0.35, 0.0, (int)v90, "bigFont.fnt", 1, 0, nullptr); std::string::~string((int)v95); return (*(int (__fastcall **)(_DWORD, GameStatsManager *))(*(_DWORD *)*(this + 116) + 228))(*(this + 116), v22); }
GD Web Decomp Icon

GD Web Decomp

Raw Source