//
// SecretLayer3::dialogClosed from 0x941d78 to 0x942024 (684 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SecretLayer3::dialogClosed @ 0x942028
// > ??> @ 0x34ae8
// > ??> @ 0x11b39c0
//
// 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
//
void SecretLayer3::dialogClosed(SecretLayer3 *a1, DialogLayer *a2)
{
_BOOL4 i; // w24
cocos2d::CCLayerColor *v5; // x20
cocos2d::CCSequence *v6; // x28
cocos2d::CCFiniteTimeAction *v7; // x0
cocos2d::CCAction *v8; // x0
CCMenuItemSpriteExtra *m_secretChest; // x0
cocos2d::CCSequence *v10; // x20
cocos2d::CCFiniteTimeAction *v11; // x0
cocos2d::CCAction *v12; // x0
GameManager *v13; // x0
GameManager *v14; // x0
if ( a2->getTag(a2) == 4 )
{
for ( i = 0; ; i = 1 )
{
v5 = cocos2d::CCLayerColor::create();
a1->addChild_0(a1, v5, 100);
((void (__fastcall *)(cocos2d::CCLayerColor *, __int64))v5->setBlendFunc)(v5, 0x100000302LL);
v6 = (cocos2d::CCSequence *)cocos2d::CCFadeTo::create(2.0, 0);
v7 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v5, 520, 1);
v8 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v6, v7, 0);
cocos2d::CCNode::runAction(v5, v8);
if ( i )
break;
}
cocos2d::CCNode::stopAllActions(a1->m_demonEyes);
a1->m_demonEyes->setVisible(a1->m_demonEyes, 0);
a1->m_demonBody->setVisible(a1->m_demonBody, 0);
m_secretChest = a1->m_secretChest;
if ( m_secretChest )
{
m_secretChest->setVisible(m_secretChest, i);
a1->m_secretChest->setEnabled(a1->m_secretChest, i);
}
v10 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(3.0);
v11 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, SecretLayer3::revealStep5, 0);
v12 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v10, v11, 0);
cocos2d::CCNode::runAction(a1, v12);
}
else if ( a2->getTag(a2) == 5 )
{
v13 = GameManager::sharedState();
GameManager::setUGV(v13, "13", 1);
a1->m_lockInput = 0;
}
else if ( a2->getTag(a2) == 3 )
{
SecretLayer3::revealStep3(a1);
}
else if ( a2->getTag(a2) == 1 )
{
SecretLayer3::firstInteractionStep3(a1);
}
else if ( a2->getTag(a2) == 2 )
{
v14 = GameManager::sharedState();
GameManager::setUGV(v14, "12", 1);
a1->m_lockInput = 0;
}
else if ( a2->getTag(a2) == 6 )
{
a1->m_lockInput = 0;
}
}