//
// LevelInfoLayer::onEdit from 0x49b148 to 0x49b21a (210 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::onPlay @ 0x49b53a
//
// 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:45 +0000
//
cocos2d::CCDirector *__fastcall LevelInfoLayer::onEdit(cocos2d::CCDirector *this, cocos2d::CCObject *a2)
{
LevelEditorLayer **v2; // r4
GameManager *v3; // r0
FMODAudioEngine *v4; // r0
int v5; // r9
cocos2d::CCDirector *v6; // r0
cocos2d::CCDirector *v7; // r5
bool v8; // r2
AppDelegate *v9; // r0
cocos2d::CCScene *v10; // r2
cocos2d::CCScene *v11; // r0
unsigned __int8 v12[12]; // [sp+18h] [bp-14h] BYREF
v2 = (LevelEditorLayer **)this;
if ( !*((_BYTE *)this + 356) )
{
if ( *((_BYTE *)this + 437) )
{
this = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(this);
if ( !*((_BYTE *)this + 140) )
{
if ( LevelInfoLayer::shouldDownloadLevel((LevelInfoLayer *)v2) )
{
return (cocos2d::CCDirector *)LevelInfoLayer::downloadLevel((LevelInfoLayer *)v2);
}
else
{
v3 = (GameManager *)(*((int (__fastcall **)(LevelEditorLayer **, _DWORD))*v2 + 134))(v2, 0);
*((_BYTE *)v2 + 356) = 1;
v4 = (FMODAudioEngine *)GameManager::sharedState(v3);
*((_DWORD *)v4 + 127) = 3;
v5 = FMODAudioEngine::sharedEngine(v4);
GJGameLevel::getAudioFileName((GJGameLevel *)v12);
FMODAudioEngine::loadMusic(v5, v12, 1.0, 0, 1.0, 1, 0, 0, 0);
v6 = (cocos2d::CCDirector *)std::string::~string((int)v12);
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
v9 = LevelEditorLayer::scene(v2[91], nullptr, v8);
v11 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(
(cocos2d::CCTransitionFade *)0x3F000000,
*(float *)&v9,
v10);
return (cocos2d::CCDirector *)cocos2d::CCDirector::replaceScene(v7, v11);
}
}
}
}
return this;
}