//
// LevelAreaInnerLayer::onDoor from 0x1402c81d0 to 0x1402c838e (446 bytes)
//
// 2 xrefs:
// > LevelAreaInnerLayer::init @ 0x1402c6b12
// > ??> @ 0x1406d2bb8
//
// 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=3
void LevelAreaInnerLayer::onDoor(LevelAreaInnerLayer *a1, cocos2d::CCObject *a2)
{
__int64 v3; // r8
__int64 v4; // r9
int v5; // ecx
CCLightFlash *v6; // rbx
struct cocos2d::CCFadeIn *v7; // rax
cocos2d::ccColor3B *v8; // r8
int v9; // r8d
FMODAudioEngine *v10; // rcx
struct cocos2d::CCDelayTime *v11; // rbx
__int64 v12; // rax
struct cocos2d::CCSequence *v13; // rax
cocos2d::ccColor3B *v14; // r8
float v15; // [rsp+20h] [rbp-38h]
float v16; // [rsp+20h] [rbp-38h]
__int128 v17; // [rsp+30h] [rbp-28h] BYREF
__int64 v18; // [rsp+40h] [rbp-18h]
__int64 v19; // [rsp+48h] [rbp-10h]
FMODAudioEngine *v20; // [rsp+60h] [rbp+8h] BYREF
FMODAudioEngine *v21; // [rsp+70h] [rbp+18h]
if ( !a1->m_enteringLevel )
{
a1->m_enteringLevel = 1;
a1->m_levelID = a2->getTag(a2);
v20 = (FMODAudioEngine *)&v17;
v17 = 0;
v18 = 0;
v19 = 15;
*(_QWORD *)&v17 = sub_14003AA10(0x20u);
v18 = 16;
v19 = 31;
strcpy((char *)v17, "playSound_01.ogg");
v5 = qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v21 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v21);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v5 = qword_1406C2E88;
}
FMODAudioEngine::playEffect(v5, (__int64)&v17, v3, v4, 1050253722);
LODWORD(v20) = 0;
v6 = (CCLightFlash *)cocos2d::CCLayerColor::create((const struct cocos2d::_ccColor4B *)&v20);
a1->addChild_0(a1, v6, 90);
v7 = cocos2d::CCFadeIn::create(0.5);
cocos2d::CCNode::runAction(v6, (cocos2d::CCPoint)v7, v8, 0.0, v15);
v10 = (FMODAudioEngine *)qword_1406C2E88;
if ( !qword_1406C2E88 )
{
v20 = (FMODAudioEngine *)operator new(0x888u);
qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v20);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);
v10 = (FMODAudioEngine *)qword_1406C2E88;
}
FMODAudioEngine::fadeOutMusic(v10, 0.5, v9);
v11 = cocos2d::CCDelayTime::create(0.5);
v12 = cocos2d::CCCallFunc::create(a1, LevelAreaInnerLayer::playStep1);
v13 = cocos2d::CCSequence::create(v11, v12, 0);
cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v13, v14, 0.0, v16);
}
}