// // GameOptionsLayer::setupOptions from 0x5e2090 to 0x5e25b4 (1316 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:54:16 +0000 // int __fastcall GameOptionsLayer::setupOptions(GameOptionsLayer *this) { GameManager *WinSize; // r0 GameManager *v3; // r0 int GameVariable; // r0 cocos2d::CCNodeRGBA *v5; // r0 GameManager *v6; // r0 int v7; // r0 cocos2d::CCNodeRGBA *v8; // r0 int v9; // r0 cocos2d::CCNodeRGBA *v10; // r0 GameManager *v11; // r0 int v12; // r0 cocos2d::CCNodeRGBA *v13; // r0 GameManager *v14; // r0 int v15; // r0 cocos2d::CCNodeRGBA *v16; // r0 GameManager *v17; // r0 int v18; // r0 cocos2d::CCNodeRGBA *v19; // r0 GameManager *v20; // r0 int v21; // r0 cocos2d::CCNodeRGBA *v22; // r0 GameManager *v23; // r0 int v24; // r0 cocos2d::CCNodeRGBA *v25; // r0 GameManager *v26; // r0 int v27; // r0 cocos2d::CCNodeRGBA *v28; // r0 GameManager *v29; // r0 int v30; // r0 cocos2d::CCNodeRGBA *v31; // r0 cocos2d::CCArray *v32; // r9 GameStatsManager *v33; // r0 GameStatsManager *v34; // r0 int isItemEnabled; // r10 const cocos2d::CCPoint *v36; // r11 float v37; // s17 float v38; // s16 cocos2d::CCNodeRGBA *ToggleButton; // r10 GameStatsManager *v40; // r0 GameStatsManager *v41; // r0 GameManager *isItemUnlocked; // r0 int v43; // r0 int v44; // r9 GameManager *v45; // r0 GameManager *v46; // r0 int v47; // r2 int v48; // r3 cocos2d::CCObject *v49; // r10 GameManager *v50; // r0 GameManager *v51; // r0 int v52; // r11 float v53; // s18 cocos2d::CCNodeRGBA *v54; // r8 cocos2d::CCObject *v55; // r0 const cocos2d::CCPoint *v56; // r6 const char *v57; // r1 ButtonSprite *v58; // r10 int v59; // r10 void (__fastcall *v60)(int, _DWORD *); // r11 const char *v61; // r1 ButtonSprite *v62; // r5 int v63; // r5 int (__fastcall *v64)(int, _BYTE *); // r6 int v66; // [sp+30h] [bp-64h] const cocos2d::CCPoint *v67; // [sp+30h] [bp-64h] float v68[2]; // [sp+38h] [bp-5Ch] BYREF _BYTE v69[8]; // [sp+40h] [bp-54h] BYREF _BYTE v70[8]; // [sp+48h] [bp-4Ch] BYREF _BYTE v71[8]; // [sp+50h] [bp-44h] BYREF _BYTE v72[8]; // [sp+58h] [bp-3Ch] BYREF int (__fastcall *v73)(GameOptionsLayer *, cocos2d::CCObject *); // [sp+60h] [bp-34h] int v74; // [sp+64h] [bp-30h] int (__fastcall *v75)(cocos2d::CCDictionary **, cocos2d::CCObject *, int, int); // [sp+68h] [bp-2Ch] int v76; // [sp+6Ch] [bp-28h] _DWORD v77[2]; // [sp+70h] [bp-24h] BYREF _DWORD v78[2]; // [sp+78h] [bp-1Ch] BYREF int v79; // [sp+80h] [bp-14h] BYREF int v80; // [sp+84h] [bp-10h] int v81; // [sp+88h] [bp-Ch] cocos2d::CCDirector::sharedDirector(this); WinSize = (GameManager *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v68); *((_DWORD *)this + 189) = 1107296256; *((_DWORD *)this + 178) = 1108606976; *((_DWORD *)this + 180) = 12; v3 = (GameManager *)GameManager::sharedState(WinSize); GameVariable = GameManager::getGameVariable(v3, "0026"); v5 = GJOptionsLayer::addToggle(this, "Auto-Retry", 1, GameVariable, (const char *)&unk_B6B226); v6 = (GameManager *)GameManager::sharedState(v5); v7 = GameManager::getGameVariable(v6, "0027"); v8 = GJOptionsLayer::addToggle(this, "Auto-Checkpoints", 2, v7, (const char *)&unk_B6B226); v9 = GameManager::sharedState(v8); v10 = GJOptionsLayer::addToggle( this, "Show Progress Bar", 3, *(unsigned __int8 *)(v9 + 724), (const char *)&unk_B6B226); v11 = (GameManager *)GameManager::sharedState(v10); v12 = GameManager::getGameVariable(v11, "0040"); v13 = GJOptionsLayer::addToggle(this, "Show Percentage", 4, v12, (const char *)&unk_B6B226); v14 = (GameManager *)GameManager::sharedState(v13); v15 = GameManager::getGameVariable(v14, "0145"); v16 = GJOptionsLayer::addToggle(this, "Show Time", 7, v15, (const char *)&unk_B6B226); v17 = (GameManager *)GameManager::sharedState(v16); v18 = GameManager::getGameVariable(v17, "0144"); v19 = GJOptionsLayer::addToggle(this, "Audio Visualizer", 5, v18, (const char *)&unk_B6B226); v20 = (GameManager *)GameManager::sharedState(v19); v21 = GameManager::getGameVariable(v20, "0109"); v22 = GJOptionsLayer::addToggle(this, "Show Info Label", 6, v21, (const char *)&unk_B6B226); v23 = (GameManager *)GameManager::sharedState(v22); v24 = GameManager::getGameVariable(v23, "0146"); v25 = GJOptionsLayer::addToggle(this, "Disable Checkpoints", 8, v24, (const char *)&unk_B6B226); v26 = (GameManager *)GameManager::sharedState(v25); v27 = GameManager::getGameVariable(v26, "0166"); v28 = GJOptionsLayer::addToggle(this, "Show Hitboxes", 9, v27, "Shows hitboxes while in practice mode."); v29 = (GameManager *)GameManager::sharedState(v28); v30 = GameManager::getGameVariable(v29, "0179"); v31 = GJOptionsLayer::addToggle( this, "Hitbox On Death", 11, v30, "Shows hitboxes upon death in both normal and practice mode."); v32 = (cocos2d::CCArray *)cocos2d::CCArray::create(v31); GJOptionsLayer::nextPosition((GJOptionsLayer *)v69, (float *)this, nullptr); v79 = 0; v80 = 0; v81 = 0; v33 = (GameStatsManager *)std::string::__init(&v79, "Practice Music Sync", 0x13u); v74 = 0; v73 = GameOptionsLayer::onPracticeMusicSync; v34 = (GameStatsManager *)GameStatsManager::sharedState(v33); isItemEnabled = GameStatsManager::isItemEnabled(v34, 12, 17); v36 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, (const cocos2d::CCPoint *)v69); v37 = *((float *)this + 183); v66 = *((_DWORD *)this + 115); v38 = *((float *)this + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, 8.0, 0.0); ToggleButton = GameToolbox::createToggleButton( (int)&v79, (int)v73, v74, isItemEnabled, v36, (int)v78, (int)this, v66, 0.8, v37, v38, (int)v77, "bigFont.fnt", 0, 0, v32); v40 = (GameStatsManager *)std::string::~string((int)&v79); v41 = (GameStatsManager *)GameStatsManager::sharedState(v40); isItemUnlocked = (GameManager *)GameStatsManager::isItemUnlocked(v41, 12, 17); if ( !isItemUnlocked ) { v43 = cocos2d::CCArray::objectAtIndex(v32, 1u); *((_BYTE *)ToggleButton + 309) = 1; LOWORD(v78[0]) = -26986; BYTE2(v78[0]) = -106; v44 = v43; CCMenuItemToggler::setSpriteColor((int)ToggleButton, (int)v78); isItemUnlocked = (GameManager *)(*(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v44 + 536))(v44, v78); } v45 = (GameManager *)GameManager::sharedState(isItemUnlocked); if ( *((_DWORD *)v45 + 101) ) { v46 = (GameManager *)GameManager::sharedState(v45); if ( *(_DWORD *)(*((_DWORD *)v46 + 101) + 1408) ) { if ( *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v46) + 404) + 1408) + 952) == 2 ) { v48 = *((_DWORD *)this + 181) + 1; *((_DWORD *)this + 181) = v48; GJOptionsLayer::incrementCountForPage(this, nullptr, v47, v48); v49 = GJOptionsLayer::layerForPage(this, nullptr); GJOptionsLayer::nextPosition((GJOptionsLayer *)v72, (float *)this, nullptr); v79 = 0; v80 = 0; v81 = 0; v50 = (GameManager *)std::string::__init(&v79, "Ignore Damage", 0xDu); v76 = 0; v75 = GJOptionsLayer::onToggle; v51 = (GameManager *)GameManager::sharedState(v50); v52 = GameManager::getGameVariable(v51, "0173"); v67 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, (const cocos2d::CCPoint *)v72); v53 = *((float *)this + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, 8.0, 0.0); v54 = GameToolbox::createToggleButton( (int)&v79, (int)v75, v76, v52, v67, (int)v78, (int)this, (int)v49, 0.8, 0.5, v53, (int)v77, "goldFont.fnt", 0, 0, nullptr); std::string::~string((int)&v79); (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, int))(*(_DWORD *)v54 + 36))(v54, 10); CCMenuItemToggler::setSizeMult(v54, 1.0); v55 = GJOptionsLayer::objectsForPage(this, nullptr); cocos2d::CCArray::addObject(v55, v54); (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, _DWORD))(*(_DWORD *)v54 + 172))(v54, 0); (*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v49 + 172))(v49, 0); } } } v56 = *((const cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v78, v68[0] * 0.5, (float)((float)(v68[1] * 0.5) - (float)(*((float *)this + 140) * 0.5)) + 26.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v70, v56); v58 = ButtonSprite::create((ButtonSprite *)"Platformer UI", v57); (*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v58 + 80))(v58, 1060320051); v77[1] = 0; v77[0] = GameOptionsLayer::onUIOptions; v59 = CCMenuItemSpriteExtra::create((int)v58, 0, (int)this, (int)GameOptionsLayer::onUIOptions, 0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v59); v60 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v59 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v72, -80.0, 0.0); cocos2d::CCPoint::operator+(v78, v70, v72); v60(v59, v78); v62 = ButtonSprite::create((ButtonSprite *)"Practice UI", v61); (*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v62 + 80))(v62, 1060320051); v78[1] = 0; v78[0] = GameOptionsLayer::onUIPOptions; v63 = CCMenuItemSpriteExtra::create((int)v62, 0, (int)this, (int)GameOptionsLayer::onUIPOptions, 0); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v63); v64 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v63 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v71, 80.0, 0.0); cocos2d::CCPoint::operator+(v72, v70, v71); return v64(v63, v72); }
GD Web Decomp Icon

GD Web Decomp

Raw Source