// // EditLevelLayer::onTest from 0x49f7c4 to 0x49f8fa (310 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:49:49 +0000 // int __fastcall EditLevelLayer::onTest(PlayLayer **this, cocos2d::CCObject *a2) { int result; // r0 int v4; // r0 int v5; // r3 int v6; // r3 int v7; // r2 int v8; // r3 int v9; // r3 GameManager *v10; // r0 bool v11; // r2 cocos2d::CCDirector *PersistentCheckpoint; // r0 float v13; // r6 cocos2d::CCArray *v14; // r0 int v15; // r0 cocos2d::CCDirector *v16; // r4 cocos2d::CCScene *v17; // r2 cocos2d::CCScene *v18; // r0 int *v19; // r4 int v20[3]; // [sp+8h] [bp-10h] BYREF result = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this); if ( !*(_BYTE *)(result + 140) ) { v4 = (int)*(this + 87); v5 = *(unsigned __int8 *)(v4 + 1148); if ( (v5 & 1) != 0 ) v6 = *(_DWORD *)(v4 + 1152); else v6 = v5 >> 1; if ( v6 && (*(_DWORD *)(v4 + 1172) != *(_DWORD *)(v4 + 612) || *(_DWORD *)(v4 + 1176) != 4) ) GJGameLevel::clearPlatformerSave((GJGameLevel *)v4); if ( !*((_BYTE *)this + 384) && ((v7 = (int)*(this + 87), v8 = *(unsigned __int8 *)(v7 + 1148), (v8 & 1) != 0) ? (v9 = *(_DWORD *)(v7 + 1152)) : (v9 = v8 >> 1), v9) ) { memset(v20, 0, sizeof(v20)); std::string::__init( v20, "There is a saved checkpoint for this level.\nDo you want to load it?", 0x5Bu); v19 = FLAlertLayer::create( (int)(this + 80), (cocos2d::CCLabelBMFont *)"Load Save", (int)v20, (ButtonSprite *)"New Game", (ButtonSprite *)"Load Save", 380.0); std::string::~string((int)v20); FLAlertLayer::addCloseButton((const cocos2d::CCPoint **)v19); *((_BYTE *)v19 + 516) = 1; (*(void (__fastcall **)(int *, int))(*v19 + 36))(v19, 11); return (*(int (__fastcall **)(int *))(*v19 + 656))(v19); } else { v10 = (GameManager *)EditLevelLayer::closeTextInputs(this); *(_DWORD *)(GameManager::sharedState(v10) + 508) = 3; PersistentCheckpoint = PlayLayer::scene(*(this + 87), nullptr, v11); v13 = *(float *)&PersistentCheckpoint; if ( *((_BYTE *)this + 384) ) { v14 = (cocos2d::CCArray *)(*(int (__fastcall **)(cocos2d::CCDirector *))(*(_DWORD *)PersistentCheckpoint + 244))(PersistentCheckpoint); v15 = cocos2d::CCArray::objectAtIndex(v14, 0); PersistentCheckpoint = (cocos2d::CCDirector *)PlayLayer::loadPersistentCheckpoint(v15, (int)*(this + 87) + 1148); *((_BYTE *)this + 384) = 0; } v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(PersistentCheckpoint); v18 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create((cocos2d::CCTransitionFade *)0x3F000000, v13, v17); return cocos2d::CCDirector::replaceScene(v16, v18); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source