// // VideoOptionsLayer::onApply from 0x8f0dd4 to 0x8f101c (584 bytes) // // 3 xrefs: // > @ 0xf7ac8 // > VideoOptionsLayer::init @ 0x8f5588 // > @ 0x1547838 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 12:56:58 +0000 // __int64 __fastcall VideoOptionsLayer::onApply(VideoOptionsLayer *this, cocos2d::CCObject *a2) { cocos2d::CCString *v3; // x0 GameManager *v4; // x0 int v5; // w22 GameManager *v6; // x0 GameManager *v7; // x0 __int64 GameVariable; // x0 GameManager *v9; // x0 GameManager *v10; // x0 cocos2d::CCDirector *v11; // x0 cocos2d::CCScene *v12; // x22 cocos2d::CCScene *v13; // x0 PlatformToolbox *v14; // x0 GameManager *v15; // x0 GameManager *v16; // x0 GameManager *v17; // x0 cocos2d::CCDirector *v18; // x0 int v19; // w20 cocos2d::CCDirector *v20; // x0 cocos2d::CCDirector *updated; // x0 GameManager *v22; // x0 GameManager *v23; // x0 GameManager *v25; // x0 GameManager *v26; // x0 GameManager *v27; // x0 __int64 v28; // x19 GameManager *v29; // x0 float v30[2]; // [xsp+38h] [xbp+38h] BYREF __int64 v31[2]; // [xsp+40h] [xbp+40h] BYREF void *v32; // [xsp+50h] [xbp+50h] v3 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(*((cocos2d::CCArray **)this + 89), *((_DWORD *)this + 189)); v4 = (GameManager *)cocos2d::CCString::intValue(v3); v5 = (int)v4; GameManager::sharedState(v4); v6 = GameManager::resolutionForKey(v5, (cocos2d::CCSize *)v30); v7 = (GameManager *)GameManager::sharedState(v6); GameVariable = GameManager::getGameVariable(v7, "0025"); if ( *((unsigned __int8 *)this + 752) != (unsigned __int8)GameVariable && (!*((_BYTE *)this + 752) || (v25 = (GameManager *)GameManager::sharedState((GameManager *)GameVariable), GameVariable = GameManager::getGameVariable(v25, "0170"), *((unsigned __int8 *)this + 753) == (unsigned __int8)GameVariable) && (v26 = (GameManager *)GameManager::sharedState((GameManager *)GameVariable), GameVariable = GameManager::getGameVariable(v26, "0175"), *((unsigned __int8 *)this + 754) == (unsigned __int8)GameVariable)) && (GameVariable = *(unsigned int *)(GameManager::sharedState((GameManager *)GameVariable) + 1056), v5 == (_DWORD)GameVariable) && (GameVariable = *(unsigned int *)(GameManager::sharedState((GameManager *)GameVariable) + 1060), (_DWORD)GameVariable == *((_DWORD *)this + 176)) ) { v31[0] = 0; v31[1] = 0; v32 = nullptr; std::string::__init(v31, "No changes have been made.", 0x1Au); v28 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Graphics", (char *)v31, (ButtonSprite *)"OK", nullptr); if ( (v31[0] & 1) != 0 ) operator delete(v32); (*(void (__fastcall **)(__int64))(*(_QWORD *)v28 + 1312LL))(v28); } else { v9 = (GameManager *)GameManager::sharedState((GameManager *)GameVariable); v10 = (GameManager *)GameManager::sharedState(v9); *((_DWORD *)v10 + 264) = v5; v11 = (cocos2d::CCDirector *)GameManager::sharedState(v10); *((_DWORD *)v11 + 265) = *((_DWORD *)this + 176); v12 = (cocos2d::CCScene *)cocos2d::CCDirector::sharedDirector(v11); v13 = (cocos2d::CCScene *)cocos2d::CCScene::create(v12); v14 = (PlatformToolbox *)cocos2d::CCDirector::replaceScene(v12, v13); PlatformToolbox::resizeWindow(v14, v30[0], v30[1]); v16 = (GameManager *)GameManager::sharedState(v15); v17 = (GameManager *)GameManager::getGameVariable(v16, "0025"); if ( *((unsigned __int8 *)this + 752) == (unsigned __int8)v17 ) { v29 = (GameManager *)GameManager::sharedState(v17); GameManager::setGameVariable(v29, "0025", *((_BYTE *)this + 752) ^ 1); PlatformToolbox::toggleFullScreen((PlatformToolbox *)*((unsigned __int8 *)this + 752)); } v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v17); v19 = *((_DWORD *)v18 + 100); v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v18); updated = (cocos2d::CCDirector *)cocos2d::CCDirector::updateContentScale(v20); v22 = (GameManager *)*(unsigned int *)(cocos2d::CCDirector::sharedDirector(updated) + 400); if ( v19 == (_DWORD)v22 ) { v27 = (GameManager *)GameManager::sharedState(v22); GameManager::queueReloadMenu(v27, 1); } else { v23 = (GameManager *)GameManager::sharedState(v22); GameManager::reloadAll(v23, 0, 0, 0, 0); } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source