//
// SecretLayer3::dialogClosed from 0x4ee2a8 to 0x4ee44e (422 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'SecretLayer3::dialogClosed @ 0x4ee46c
//
// 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 v4; // r7
char v5; // r2
cocos2d::CCLayerColor *v6; // r6
cocos2d::CCSequence *v7; // r10
cocos2d::CCFiniteTimeAction *v8; // r0
int v9; // r3
cocos2d::CCAction *v10; // r0
CCMenuItemSpriteExtra *m_secretChest; // r0
cocos2d::CCSequence *v12; // r7
cocos2d::CCFiniteTimeAction *v13; // r0
cocos2d::CCAction *v14; // r0
GameManager *v15; // r0
const char *v16; // r1
int v17; // [sp+0h] [bp-18h]
if ( a2->getTag(a2) != 4 )
{
if ( a2->getTag(a2) == 5 )
{
v15 = GameManager::sharedState();
v16 = "13";
}
else
{
if ( a2->getTag(a2) == 3 )
{
SecretLayer3::revealStep3(a1);
return;
}
if ( a2->getTag(a2) == 1 )
{
SecretLayer3::firstInteractionStep3(a1);
return;
}
if ( a2->getTag(a2) != 2 )
{
if ( a2->getTag(a2) != 6 )
return;
goto LABEL_18;
}
v15 = GameManager::sharedState();
v16 = "12";
}
GameManager::setUGV(v15, v16, 1);
LABEL_18:
a1->m_lockInput = 0;
return;
}
v4 = 0;
v5 = -1;
while ( 1 )
{
HIBYTE(v17) = v5;
LOWORD(v17) = -1;
BYTE2(v17) = -1;
v6 = cocos2d::CCLayerColor::create();
a1->addChild_0(a1, v6, 100);
((void (__fastcall *)(cocos2d::CCLayerColor *, int, int))v6->setBlendFunc)(v6, 770, 1);
v7 = (cocos2d::CCSequence *)cocos2d::CCFadeTo::create(2.0, 0);
v8 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v6, 260, 1);
v10 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v7, v8, 0, v9, v17, 260, 1);
cocos2d::CCNode::runAction(v6, v10);
v5 = 80;
if ( v4 )
break;
v4 = 1;
}
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, v4);
a1->m_secretChest->setEnabled(a1->m_secretChest, v4);
}
v12 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(3.0);
v13 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, SecretLayer3::revealStep5, 0);
v14 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v12, v13, 0);
cocos2d::CCNode::runAction(a1, v14);
}