//
// GJShopLayer::dialogClosed from 0x1003270b0 to 0x100327226 (374 bytes)
//
// 2 xrefs:
// > sub_100327250 @ 0x10032725c
// > ??> @ 0x100913b78
//
// 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 __fastcall GJShopLayer::dialogClosed(GJShopLayer *a1, DialogLayer *a2)
{
__m128 v2; // xmm0
FMODAudioEngine *v3; // rax
cocos2d::CCLayerColor *v4; // rax
FMODAudioEngine *v5; // rax
cocos2d::CCDirector *v6; // rax
cocos2d::CCTouchDispatcher *v7; // rax
cocos2d::CCDirector *v8; // rbx
cocos2d::CCScene *v9; // rax
cocos2d::CCTransitionFade *v10; // rax
GameStatsManager *v11; // rax
GJRewardItem *v12; // r14
RewardUnlockLayer *v13; // r15
char v14; // [rsp+0h] [rbp-50h] BYREF
char v15[15]; // [rsp+1h] [rbp-4Fh] BYREF
void *v16; // [rsp+10h] [rbp-40h]
char v17; // [rsp+18h] [rbp-38h] BYREF
void *v18[3]; // [rsp+19h] [rbp-37h] BYREF
int v19; // [rsp+34h] [rbp-1Ch] BYREF
if ( ((unsigned int (__fastcall *)(DialogLayer *))a2->getTag)(a2) == 1 )
{
v3 = FMODAudioEngine::sharedEngine();
v17 = 22;
strcpy((char *)v18, "door001.ogg");
FMODAudioEngine::playEffect(v3, &v17, 1.0, 0.0, 0.80000001);
if ( (v17 & 1) != 0 )
operator delete(*(void **)((char *)&v18[1] + 7));
v19 = -16777216;
v4 = cocos2d::CCLayerColor::create_1((const cocos2d::ccColor4B *)&v19);
((void (__fastcall *)(GJShopLayer *, cocos2d::CCLayerColor *, __int64))a1->addChild_0)(a1, v4, 1000);
v5 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v5, 1);
v6 = cocos2d::CCDirector::sharedDirector();
v7 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v6->getTouchDispatcher)(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a1);
v8 = cocos2d::CCDirector::sharedDirector();
v9 = GJGarageLayer::scene();
v10 = cocos2d::CCTransitionFade::create_1(1.0, v9);
cocos2d::CCDirector::replaceScene(v8, v10);
}
else if ( ((unsigned int (__fastcall *)(DialogLayer *))a2->getTag)(a2) == 2 )
{
v11 = GameStatsManager::sharedState();
v14 = 8;
strcpy(v15, "0022");
v12 = GameStatsManager::unlockSpecialChest(v11, (__int64)&v14, v2);
if ( (v14 & 1) != 0 )
operator delete(v16);
if ( v12 )
{
v13 = RewardUnlockLayer::create(v12->m_rewardType, nullptr);
((void (__fastcall *)(GJShopLayer *, RewardUnlockLayer *, __int64))a1->addChild_0)(a1, v13, 100);
RewardUnlockLayer::showCollectReward(v13, v12);
}
}
}