// // MoreVideoOptionsLayer::addToggle from 0x52e8ac to 0x52eb66 (698 bytes) // // 2 xrefs: // > MoreVideoOptionsLayer::init @ 0x52ef04 // > MoreVideoOptionsLayer::init @ 0x52ef16 // // 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:02 +0000 // int __fastcall MoreVideoOptionsLayer::addToggle(MoreVideoOptionsLayer *this, const char *a2, char *a3, const char *a4) { const char *v4; // r10 int v7; // r0 float v10; // r0 int v11; // r3 int v12; // s15 GameManager *v13; // r9 GameManager *v14; // r0 int GameVariable; // r0 cocos2d::CCDictionary *v16; // r8 size_t v17; // r0 cocos2d::CCObject *v18; // r0 cocos2d::CCObject *v19; // r0 int v20; // r7 size_t v21; // r0 const cocos2d::CCPoint *v22; // r3 cocos2d::CCNodeRGBA *ToggleButton; // r6 int v24; // r2 int v25; // r3 cocos2d::CCObject *v26; // r10 int result; // r0 size_t v28; // r0 cocos2d::CCObject *v29; // r11 size_t v30; // r0 const char *v31; // r1 int v32; // r5 cocos2d::CCObject *v33; // r5 void (__fastcall *v34)(cocos2d::CCObject *, _BYTE *); // r9 int v35; // r6 int v36; // [sp+30h] [bp-5Ch] int v37; // [sp+30h] [bp-5Ch] const cocos2d::CCPoint *v38; // [sp+34h] [bp-58h] const char *v39; // [sp+34h] [bp-58h] _BYTE v40[8]; // [sp+44h] [bp-48h] BYREF _BYTE v41[8]; // [sp+4Ch] [bp-40h] BYREF _BYTE v42[8]; // [sp+54h] [bp-38h] BYREF _DWORD (*v43)(MoreVideoOptionsLayer *__hidden, cocos2d::CCObject *); // [sp+5Ch] [bp-30h] int v44; // [sp+60h] [bp-2Ch] _DWORD v45[2]; // [sp+64h] [bp-28h] BYREF int v46[3]; // [sp+6Ch] [bp-20h] BYREF int v47; // [sp+78h] [bp-14h] BYREF int v48; // [sp+7Ch] [bp-10h] int v49; // [sp+80h] [bp-Ch] v7 = *((_DWORD *)this + 131); *((_DWORD *)this + 131) = v7 + 1; v10 = floorf((float)(v7 / 10)); v11 = *((_DWORD *)this + 132); v12 = LODWORD(v10); if ( v10 <= 0.0 ) v4 = nullptr; else v12 = (int)v10; if ( v10 > 0.0 ) v4 = (const char *)v12; if ( v11 < (int)v4 ) *((_DWORD *)this + 132) = v4; else *((_DWORD *)this + 132) = v11; v13 = (GameManager *)atoi(a3); v14 = (GameManager *)GameManager::sharedState(v13); GameVariable = GameManager::getGameVariable(v14, a3); v47 = 0; v48 = 0; v49 = 0; v16 = *((cocos2d::CCDictionary **)this + 134); v36 = GameVariable; v17 = strlen(a3); std::string::__init(&v47, a3, v17); v18 = (cocos2d::CCObject *)cocos2d::CCString::create(&v47); cocos2d::CCDictionary::setObject(v16, v18, (int)v13); std::string::~string((int)&v47); MoreVideoOptionsLayer::nextPosition((MoreVideoOptionsLayer *)v40, this, v4); v19 = MoreVideoOptionsLayer::layerForPage(this, v4); v47 = 0; v48 = 0; v49 = 0; v20 = (int)v19; v21 = strlen(a2); std::string::__init(&v47, a2, v21); v22 = *((const cocos2d::CCPoint **)this + 111); v44 = 0; v38 = v22; v43 = MoreVideoOptionsLayer::onToggle; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v45, (const cocos2d::CCPoint *)v40); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, 8.0, 0.0); ToggleButton = GameToolbox::createToggleButton( (int)&v47, (int)v43, v44, v36, v38, (int)v45, (int)this, v20, 0.8, 0.5, 110.0, (int)v42, "bigFont.fnt", 0, 0, nullptr); std::string::~string((int)&v47); (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, GameManager *))(*(_DWORD *)ToggleButton + 36))(ToggleButton, v13); CCMenuItemToggler::setSizeMult(ToggleButton, 1.0); MoreVideoOptionsLayer::incrementCountForPage(this, v4, v24, v25); v26 = MoreVideoOptionsLayer::objectsForPage(this, v4); cocos2d::CCArray::addObject(v26, ToggleButton); (*(void (__fastcall **)(cocos2d::CCNodeRGBA *, _DWORD))(*(_DWORD *)ToggleButton + 172))(ToggleButton, 0); result = (*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v20 + 172))(v20, 0); if ( a4 ) { v37 = *((_DWORD *)this + 133); memset(v46, 0, sizeof(v46)); v28 = strlen(a4); std::string::__init(v46, a4, v28); v29 = (cocos2d::CCObject *)cocos2d::CCString::create(v46); v39 = (const char *)MoreVideoOptionsLayer::infoKey(this, (const char *)v13); v47 = 0; v48 = 0; v49 = 0; v30 = strlen(v39); std::string::__init(&v47, v39, v30); cocos2d::CCDictionary::setObject(v37, v29); std::string::~string((int)&v47); std::string::~string((int)v46); v32 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v31); (*(void (__fastcall **)(int, int))(*(_DWORD *)v32 + 80))(v32, 1056964608); v45[0] = MoreVideoOptionsLayer::onInfo; v45[1] = 0; v33 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v32, 0, (int)this, (int)MoreVideoOptionsLayer::onInfo, 0); CCMenuItemSpriteExtra::setSizeMult((int)v33, 2.0); (*(void (__fastcall **)(cocos2d::CCObject *, GameManager *))(*(_DWORD *)v33 + 36))(v33, v13); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))( *((_DWORD *)this + 111), v33); v34 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v33 + 92); v35 = (*(int (__fastcall **)(cocos2d::CCNodeRGBA *))(*(_DWORD *)ToggleButton + 96))(ToggleButton); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -18.0, 16.0); cocos2d::CCPoint::operator+(v42, v35, v41); v34(v33, v42); cocos2d::CCArray::addObject(v26, v33); return (*(int (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v33 + 172))(v33, 0); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source