//
// LevelAreaInnerLayer::scene from 0x100265f20 to 0x10026601a (250 bytes)
//
// 5 xrefs:
// > LevelAreaLayer::onEnterTower @ 0x100265eef
// > GameManager::returnToLastScene @ 0x100376ad3
// > SecretLayer5::onBack @ 0x10046fd83
// > SecretLayer5::keyBackClicked @ 0x1004731c3
// > sub_1004731F0 @ 0x10047323e
//
// 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 12:27:33 +0000
//
__int64 __fastcall LevelAreaInnerLayer::scene(__int64 a1, __int64 a2)
{
__int64 v2; // rbx
_QWORD *v3; // r14
v2 = cocos2d::CCScene::create(a1);
*(_QWORD *)(AppDelegate::get(a1, a2) + 72) = v2;
v3 = operator new(0x1B8u);
cocos2d::CCLayer::CCLayer(v3);
*v3 = off_100AF6250;
v3[40] = off_100AF66E8;
v3[41] = &off_100AF6758;
v3[42] = off_100AF6770;
v3[43] = off_100AF6790;
v3[44] = off_100AF67B8;
v3[51] = &off_100AF67E8;
v3[52] = 0;
*((_BYTE *)v3 + 424) = 0;
*((_DWORD *)v3 + 107) = 0;
*((_BYTE *)v3 + 432) = 0;
if ( (unsigned __int8)LevelAreaInnerLayer::init(v3, (unsigned __int8)a1) )
{
cocos2d::CCObject::autorelease(v3);
}
else
{
(*(void (__fastcall **)(_QWORD *))(*v3 + 16LL))(v3);
v3 = nullptr;
}
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v2 + 456LL))(v2, v3);
return v2;
}