//
// GJShopLayer::dialogClosed from 0x4e1d34 to 0x4e1e50 (284 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'GJShopLayer::dialogClosed @ 0x4e1e64
//
// 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 GJShopLayer::dialogClosed(GJShopLayer *a1, DialogLayer *a2)
{
FMODAudioEngine *v4; // r7
cocos2d::CCLayerColor *v5; // r0
FMODAudioEngine *v6; // r0
cocos2d::CCDirector *v7; // r0
cocos2d::CCTouchDispatcher *v8; // r0
cocos2d::CCDirector *v9; // r4
cocos2d::CCScene *v10; // r0
cocos2d::CCTransitionFade *v11; // r0
int *v12; // r7
GJRewardItem *v13; // r7
RewardUnlockLayer *v14; // r4
_BYTE v15[4]; // [sp+10h] [bp-Ch] BYREF
if ( a2->getTag(a2) == 1 )
{
v4 = FMODAudioEngine::sharedEngine();
sub_776584((int)v15, "door001.ogg");
FMODAudioEngine::playEffect(v4, (int)v15, 1.0, 0, 1061997773);
sub_774008(v15);
v15[0] = 0;
v15[1] = 0;
v15[2] = 0;
v15[3] = -1;
v5 = cocos2d::CCLayerColor::create();
a1->addChild_0(a1, v5, 1000);
v6 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v6, (bool)&dword_0 + 1);
v7 = cocos2d::CCDirector::sharedDirector();
v8 = v7->getTouchDispatcher(v7);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v8, a1);
v9 = cocos2d::CCDirector::sharedDirector();
v10 = GJGarageLayer::scene();
v11 = cocos2d::CCTransitionFade::create(1.0, v10);
cocos2d::CCDirector::replaceScene(v9, v11);
}
else if ( a2->getTag(a2) == 2 )
{
v12 = (int *)GameStatsManager::sharedState();
sub_776584((int)v15, "0022");
v13 = GameStatsManager::unlockSpecialChest(v12, (stl::StringData::Internal *)v15);
sub_774008(v15);
if ( v13 )
{
v14 = RewardUnlockLayer::create(v13->m_rewardType, nullptr);
a1->addChild_0(a1, v14, 100);
RewardUnlockLayer::showCollectReward(v14, v13);
}
}
}