//
// CreatorLayer::dialogClosed from 0x14009f740 to 0x14009f7fa (186 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405437b0
// > ??> @ 0x1406c7650
//
// 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
//
// Hidden C++ exception states: #wind=1
void CreatorLayer::dialogClosed(CreatorLayer *a1, DialogLayer *a2)
{
int v3; // eax
GameManager *v4; // rcx
__int64 v5; // rbx
cocos2d::CCSpriteFrameCache *v6; // rax
struct cocos2d::CCSpriteFrame *v7; // rax
void *v8; // [rsp+38h] [rbp+10h]
v3 = a2->getTag(a2);
if ( v3 )
{
if ( v3 == 1 )
CreatorLayer::onAdventureMap((CreatorLayer *)((char *)a1 - 416), nullptr);
}
else
{
v4 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v8 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v4 = (GameManager *)qword_1406C2ED8;
}
GameManager::setUGV(v4, (const char *)&word_140531E90, 1);
v5 = **(_QWORD **)&a1->m_uID;
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, "secretDoorBtn_open_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSpriteFrame *))(v5 + 992))(*(_QWORD *)&a1->m_uID, v7);
}
}