//
// OptionsLayer::onSecretVault from 0x421894 to 0x421a34 (416 bytes)
//
// 0 xrefs:
//
// 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 OptionsLayer::onSecretVault(OptionsLayer *a1, cocos2d::CCObject *a2)
{
GameStatsManager *v3; // r0
cocos2d::CCDirector *v4; // r4
cocos2d::CCScene *v5; // r0
cocos2d::CCTransitionFade *v6; // r0
int m_lastVaultDialog; // r3
char *v8; // r1
DialogObject *v9; // r0
DialogLayer *v10; // r9
_BYTE v11[4]; // [sp+10h] [bp-14h] BYREF
char v12; // [sp+14h] [bp-10h] BYREF
_BYTE v13[4]; // [sp+18h] [bp-Ch] BYREF
v3 = GameStatsManager::sharedState();
if ( GameStatsManager::getStat(v3, "12") <= 9 )
{
sub_776584((int)v11, "zzz");
m_lastVaultDialog = a1->m_lastVaultDialog;
if ( m_lastVaultDialog >= 0 )
{
a1->m_lastVaultDialog = m_lastVaultDialog + 1;
}
else
{
rand();
a1->m_lastVaultDialog = lroundf();
}
if ( a1->m_lastVaultDialog > 10 )
a1->m_lastVaultDialog = 0;
switch ( a1->m_lastVaultDialog )
{
case 0:
v8 = "Go away!";
goto LABEL_20;
case 1:
v8 = "No!";
goto LABEL_20;
case 2:
v8 = "It's a secret...";
goto LABEL_20;
case 3:
v8 = "Stop it!";
goto LABEL_20;
case 4:
v8 = "Not allowed!";
goto LABEL_20;
case 5:
v8 = "Why u click?";
goto LABEL_20;
case 6:
v8 = "Nothing to see here...";
goto LABEL_20;
case 7:
v8 = "Don't touch!";
goto LABEL_20;
case 8:
v8 = "Just, stop.";
goto LABEL_20;
case 9:
v8 = "No one seems to be home.";
goto LABEL_20;
case 0xA:
v8 = "zzzZZZ...";
LABEL_20:
sub_7753D4((int)v11, v8);
break;
default:
break;
}
sub_776584((int)&v12, "The Guard");
sub_775C20(v13);
v9 = (DialogObject *)DialogObject::create(
(DialogObject *)&v12,
(std::string)v13,
(std::string)1,
1065353216,
0.0,
255);
v10 = DialogLayer::create(v9, (int)&dword_0 + 1);
sub_774008(v13);
sub_774008(&v12);
a1->addChild_0(a1, v10, 100);
DialogLayer::updateChatPlacement(v10, Center);
DialogLayer::animateInRandomSide(v10);
sub_774008(v11);
}
else
{
v4 = cocos2d::CCDirector::sharedDirector();
v5 = SecretLayer::scene();
v6 = cocos2d::CCTransitionFade::create(0.5, v5);
cocos2d::CCDirector::replaceScene(v4, v6);
}
}