//
// GJGarageLayer::scene from 0x140272e90 to 0x14027304b (443 bytes)
//
// 6 xrefs:
// > GJShopLayer::onBack @ 0x1402acdd6
// > GJShopLayer::dialogClosed @ 0x1402ae7c5
// > LevelInfoLayer::onGarage @ 0x1402f9def
// > MenuLayer::onGarage @ 0x140335e16
// > ??> @ 0x1406d0ed8
// > ??> @ 0x1406d0ee4
//
// 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
//
// Hidden C++ exception states: #wind=2
cocos2d::CCScene *GJGarageLayer::scene()
{
__int64 v0; // rcx
cocos2d::CCScene *v1; // rsi
__int64 v2; // rdx
__int64 v3; // rcx
GJGarageLayer *v4; // rdi
_QWORD *v5; // rax
bool (*init)(GJGarageLayer *); // rdx
bool v7; // al
v1 = (cocos2d::CCScene *)cocos2d::CCScene::create(v0);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v3, v2) + 224) = v1;
v4 = (GJGarageLayer *)operator new(0x260u);
cocos2d::CCLayer::CCLayer(v4);
v4->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJGarageLayer_vtbl *)&GJGarageLayer::`vftable';
v4->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->TextInputDelegate::__vftable = (TextInputDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->FLAlertLayerProtocol::__vftable = (FLAlertLayerProtocol_vtbl *)&GJGarageLayer::`vftable';
v4->GameRateDelegate::__vftable = (GameRateDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->ListButtonBarDelegate::__vftable = (ListButtonBarDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->DialogDelegate::__vftable = (DialogDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->CharacterColorDelegate::__vftable = (CharacterColorDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->RewardedVideoDelegate::__vftable = (RewardedVideoDelegate_vtbl *)&GJGarageLayer::`vftable';
v4->m_playerObject = nullptr;
v4->m_unknown = nullptr;
v4->m_supporter = nullptr;
v4->m_hasClosed = 0;
v4->m_iconPages._Mypair._Myval2._Myval2._Myhead = nullptr;
v4->m_iconPages._Mypair._Myval2._Myval2._Mysize = 0;
v5 = operator new(0x28u);
*v5 = v5;
v5[1] = v5;
v5[2] = v5;
*((_WORD *)v5 + 12) = 257;
v4->m_iconPages._Mypair._Myval2._Myval2._Myhead = (std::_Tree_val>>::_Nodeptr)v5;
v4->m_cursor2 = nullptr;
v4->m_currentIcon = nullptr;
v4->m_iconSelection = nullptr;
*(_QWORD *)&v4->m_iconID = 0;
v4->m_videoPlaying = 0;
init = (bool (*)(GJGarageLayer *))v4->init;
if ( init == GJGarageLayer::init )
v7 = GJGarageLayer::init(v4);
else
v7 = init(v4);
if ( v7 )
{
cocos2d::CCObject::autorelease(v4);
}
else
{
((void (__fastcall *)(GJGarageLayer *, __int64))v4->~GJGarageLayer)(v4, 1);
v4 = nullptr;
}
v1->addChild_1(v1, v4);
return v1;
}