//
// GJGameLoadingLayer::transitionToLoadingLayer from 0x100165200 to 0x100165307 (263 bytes)
//
// 3 xrefs:
// > EditorPauseLayer::playStep3 @ 0x100294dcf
// > PauseLayer::goEdit @ 0x1003d7903
// > EndLevelLayer::goEdit @ 0x1004c315b
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
GJGameLoadingLayer *__fastcall GJGameLoadingLayer::transitionToLoadingLayer(GJGameLevel *a1, bool a2)
{
cocos2d::CCScene *v2; // r14
GJGameLoadingLayer *v3; // rbx
cocos2d::CCDirector *v4; // r15
cocos2d::CCTransitionFade *v5; // rax
v2 = cocos2d::CCScene::create();
AppDelegate::get()->m_runningScene = v2;
v3 = (GJGameLoadingLayer *)operator new(0x1A8u);
cocos2d::CCLayer::CCLayer(v3);
v3->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJGameLoadingLayer_vtbl *)off_1008C1B10;
v3->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)off_1008C1F90;
v3->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_1008C2000;
v3->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)off_1008C2018;
v3->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)off_1008C2038;
v3->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)off_1008C2058;
v3->m_level = nullptr;
v3->m_editor = 0;
if ( GJGameLoadingLayer::init(v3, a1, a2) )
{
cocos2d::CCObject::autorelease(v3);
}
else
{
((void (__fastcall *)(GJGameLoadingLayer *))v3->~GJGameLoadingLayer_0)(v3);
v3 = nullptr;
}
((void (__fastcall *)(cocos2d::CCScene *, GJGameLoadingLayer *))v2->addChild)(v2, v3);
v2->m_eObjType = PlayLayerObjectType;
v4 = cocos2d::CCDirector::sharedDirector();
v5 = cocos2d::CCTransitionFade::create_1(0.1, v2);
cocos2d::CCDirector::replaceScene(v4, v5);
return v3;
}