//
// EditLevelLayer::onEdit from 0x100110224 to 0x100110308 (228 bytes)
//
// 2 xrefs:
// > EditLevelLayer::FLAlert_Clicked @ 0x1001123a0
// > EditLevelLayer::init @ 0x10010f730
//
// 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 10:59:08 +0000
//
__int64 __fastcall EditLevelLayer::onEdit(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x20
__int64 Music; // x0
int v7; // w20
__int64 v8; // x0
void *v9; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v11; // [xsp+1Fh] [xbp-11h]
result = cocos2d::CCDirector::sharedDirector(a1);
if ( (*(_BYTE *)(result + 176) & 1) == 0 && (*(_BYTE *)(a1 + 496) & 1) == 0 )
{
sub_100111734(a1);
v3 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
*(_BYTE *)(a1 + 496) = 1;
*(_DWORD *)(GameManager::sharedState(v3) + 708) = 3;
v4 = EditLevelLayer::verifyLevelName(a1);
v5 = FMODAudioEngine::sharedEngine(v4);
GJGameLevel::getAudioFileName(*(_QWORD *)(a1 + 472), __p);
Music = FMODAudioEngine::loadMusic(v5, __p, 1, 0, 0, 0, 1.0, 0.0, 1.0);
if ( v11 < 0 )
operator delete(__p[0]);
v7 = cocos2d::CCDirector::sharedDirector(Music);
v8 = LevelEditorLayer::scene(*(_QWORD *)(a1 + 472), 0);
v9 = (void *)cocos2d::CCTransitionFade::create_1(v8, 0.5);
return cocos2d::CCDirector::replaceScene(v7, v9);
}
return result;
}