// // EditLevelLayer::onClone from 0x4a20a8 to 0x4a2154 (172 bytes) // // 1 xrefs: // > EditLevelLayer::FLAlert_Clicked @ 0x4a218a // // 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:51 +0000 // int __fastcall EditLevelLayer::onClone(GJGameLevel **this) { int result; // r0 int v3; // r4 GameManager *v4; // r0 GameLevelManager *v5; // r0 GameLevelManager *v6; // r0 GJGameLevel *NewLevel; // r6 int v8; // r1 int v9; // r2 int v10; // r3 int v11; // r3 int v12; // r2 int v13; // r3 cocos2d::CCDirector *v14; // r0 int v15; // s15 cocos2d::CCDirector *v16; // r4 GJGameLevel *v17; // r1 AppDelegate *v18; // r0 cocos2d::CCScene *v19; // r2 cocos2d::CCScene *v20; // r1 result = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this); if ( !*(_BYTE *)(result + 140) ) { v3 = *((unsigned __int8 *)this + 360); if ( !*((_BYTE *)this + 360) ) { v4 = (GameManager *)(*((int (__fastcall **)(GJGameLevel **, _DWORD))*this + 134))( this, *((unsigned __int8 *)this + 360)); *((_BYTE *)this + 360) = 1; v5 = (GameLevelManager *)GameManager::sharedState(v4); *((_DWORD *)v5 + 127) = 2; v6 = (GameLevelManager *)GameLevelManager::sharedState(v5); NewLevel = (GJGameLevel *)GameLevelManager::createNewLevel(v6); GJGameLevel::copyLevelInfo(NewLevel, *(this + 87)); EditLevelLayer::verifyLevelName((EditLevelLayer *)this, v8, v9, v10); v11 = (int)*(this + 87); v12 = *(_DWORD *)(v11 + 812); v13 = *(_DWORD *)(v11 + 816); if ( v12 != v13 ) v3 = v12 - v13; *((_DWORD *)NewLevel + 205) = v3; v14 = (cocos2d::CCDirector *)rand(); v15 = (int)(float)(vcvts_n_f32_s32((unsigned int)v14, 0x1Fu) * 1000.0); *((_DWORD *)NewLevel + 204) = v15; *((_DWORD *)NewLevel + 203) = v15 + v3; v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14); v18 = EditLevelLayer::scene(NewLevel, v17); v20 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create( (cocos2d::CCTransitionFade *)0x3F000000, *(float *)&v18, v19); return cocos2d::CCDirector::replaceScene(v16, v20); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source