//
// LevelInfoLayer::onEdit from 0x7e7558 to 0x7e76ac (340 bytes)
//
// 4 xrefs:
// > LevelInfoLayer::onPlay @ 0x7e7ad0
// > ??> @ 0x44818
// > LevelInfoLayer::init @ 0x7ec554
// > ??> @ 0x1541408
//
// 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:54:29 +0000
//
__int64 __fastcall LevelInfoLayer::onEdit(GJGameLevel **this, cocos2d::CCObject *a2)
{
cocos2d::CCDirector *v3; // x0
GameManager *v5; // x0
FMODAudioEngine *v6; // x0
__int64 v7; // x23
cocos2d::CCDirector *v8; // x0
cocos2d::CCDirector *v9; // x21
AppDelegate *v10; // x0
cocos2d::CCScene *v11; // x1
cocos2d::CCScene *v12; // x0
cocos2d::CCDirector *v13[3]; // [xsp+50h] [xbp+50h] BYREF
if ( !*((_BYTE *)this + 488) )
{
v3 = (cocos2d::CCDirector *)*((unsigned __int8 *)this + 645);
if ( *((_BYTE *)this + 645) )
{
if ( !*(_BYTE *)(cocos2d::CCDirector::sharedDirector(v3) + 176) )
{
if ( LevelInfoLayer::shouldDownloadLevel((LevelInfoLayer *)this) )
{
LevelInfoLayer::downloadLevel((LevelInfoLayer *)this);
}
else
{
v5 = (GameManager *)(*((__int64 (__fastcall **)(GJGameLevel **, _QWORD))*this + 134))(this, 0);
*((_BYTE *)this + 488) = 1;
v6 = (FMODAudioEngine *)GameManager::sharedState(v5);
*((_DWORD *)v6 + 177) = 3;
v7 = FMODAudioEngine::sharedEngine(v6);
GJGameLevel::getAudioFileName((__int64 *)v13, *(this + 63));
FMODAudioEngine::loadMusic(v7, (char *)v13, 1u, 0, 0, 0, 1.0, 0.0, 1.0);
v8 = (cocos2d::CCDirector *)LOBYTE(v13[0]);
if ( ((__int64)v13[0] & 1) != 0 )
operator delete(v13[2]);
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v8);
v10 = LevelEditorLayer::scene(*(this + 63), nullptr);
v12 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v10, 0.5, v11);
cocos2d::CCDirector::replaceScene(v9, v12);
}
}
}
}
return _stack_chk_guard;
}