//
// GJGameLoadingLayer::loadLevel from 0x140353300 to 0x140353394 (148 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::dGJBaseGameLayer @ 0x14030c1e7
// > ??> @ 0x140920438
//
// This function is hookable on this platform (idp: pc, 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 11:30:48 +0000
//
bool __fastcall GJGameLoadingLayer::loadLevel(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v4; // rdi
struct cocos2d::CCScene *v5; // rbx
__int64 v6; // rcx
__int64 v7; // rax
struct cocos2d::CCScene *v8; // rdx
struct cocos2d::CCScene *v9; // rbx
__int64 v10; // rcx
cocos2d::CCDirector *v11; // rax
v4 = *(_QWORD *)(a1 + 408);
if ( *(_BYTE *)(a1 + 416) )
{
v5 = (struct cocos2d::CCScene *)cocos2d::CCScene::create(a1, a2, a3, a4);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v6) + 232) = v5;
v7 = LevelEditorLayer::create(v4, 0);
(*(void (__fastcall **)(struct cocos2d::CCScene *, __int64))(*(_QWORD *)v5 + 464LL))(v5, v7);
v8 = v5;
*((_DWORD *)v5 + 7) = 6;
}
else
{
v8 = (struct cocos2d::CCScene *)PlayLayer::scene(*(_QWORD *)(a1 + 408), 0);
}
v9 = cocos2d::CCTransitionFade::create(0.40000001, v8);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
return cocos2d::CCDirector::replaceScene(v11, v9);
}