//
// GJGameLoadingLayer::transitionToLoadingLayer from 0x140353110 to 0x1403532fc (492 bytes)
//
// 4 xrefs:
// > EditorPauseLayer::playStep3 @ 0x1401827ab
// > EndLevelLayer::goEdit @ 0x1402066ad
// > PauseLayer::goEdit @ 0x1404db4d9
// > ??> @ 0x14092042c
//
// 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
//
// Hidden C++ exception states: #wind=1
cocos2d::CCLayer *__fastcall GJGameLoadingLayer::transitionToLoadingLayer(
cocos2d::CCObject *a1,
__int64 a2,
__int64 a3,
__int64 a4)
{
char v4; // di
struct cocos2d::CCScene *v6; // r14
__int64 v7; // rcx
cocos2d::CCLayer *v8; // rsi
__int64 v9; // rcx
__int64 v10; // rax
struct cocos2d::CCLabelBMFont *v11; // rdi
__int64 v12; // rbx
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // rax
struct cocos2d::CCScene *v16; // rbx
__int64 v17; // rcx
cocos2d::CCDirector *v18; // rax
cocos2d::CCLayer *v20; // [rsp+50h] [rbp+18h] BYREF
char v21; // [rsp+58h] [rbp+20h] BYREF
v4 = a2;
v6 = (struct cocos2d::CCScene *)cocos2d::CCScene::create(a1, a2, a3, a4);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v7) + 232) = v6;
v8 = (cocos2d::CCLayer *)operator new(0x1A8u);
v20 = v8;
cocos2d::CCLayer::CCLayer(v8);
*(_QWORD *)v8 = &GJGameLoadingLayer::`vftable';
*((_QWORD *)v8 + 40) = &GJGameLoadingLayer::`vftable';
*((_QWORD *)v8 + 41) = &GJGameLoadingLayer::`vftable';
*((_QWORD *)v8 + 42) = &GJGameLoadingLayer::`vftable';
*((_QWORD *)v8 + 43) = &GJGameLoadingLayer::`vftable';
*((_QWORD *)v8 + 44) = &GJGameLoadingLayer::`vftable';
*((_QWORD *)v8 + 51) = 0;
*((_BYTE *)v8 + 416) = 0;
if ( cocos2d::CCLayer::init(v8) )
{
if ( a1 )
{
*((_QWORD *)v8 + 51) = a1;
cocos2d::CCObject::retain(a1);
}
*((_BYTE *)v8 + 416) = v4;
v10 = cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v10, &v20);
v11 = cocos2d::CCLabelBMFont::create("Loading...", (const char *)&qword_140704F78);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v11 + 160LL))(v11);
(*(void (__fastcall **)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v8 + 456LL))(
v8,
v11,
1);
v12 = *(_QWORD *)v11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, 1.0, 0.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v12 + 288))(v11, v13);
v14 = *(_QWORD *)v11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, *(float *)&v20 - 20.0, 20.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v14 + 184))(v11, v15);
cocos2d::CCObject::autorelease(v8);
}
else
{
(*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v8 + 8LL))(v8, 1);
v8 = nullptr;
}
(*(void (__fastcall **)(struct cocos2d::CCScene *, cocos2d::CCLayer *))(*(_QWORD *)v6 + 464LL))(v6, v8);
*((_DWORD *)v6 + 7) = 5;
v16 = cocos2d::CCTransitionFade::create(0.1, v6);
v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v17);
cocos2d::CCDirector::replaceScene(v18, v16);
return v8;
}