//
// SetupTriggerPopup::onClose from 0x140475a40 to 0x140475b80 (320 bytes)
//
// 90 xrefs:
// > CustomizeObjectSettingsPopup::onClose @ 0x1400aa5b4
// > GJFollowCommandLayer::onClose @ 0x140272b4c
// > GJPFollowCommandLayer::onClose @ 0x14028d00c
// > EditTriggersPopup::onClose @ 0x14028f250
// > EditorOptionsLayer::onClose @ 0x140291c9e
// > UIOptionsLayer::onClose @ 0x1402a30b8
// > UIPOptionsLayer::onClose @ 0x1402a5f18
// > SetItemIDLayer::onClose @ 0x140401be1
// > SetupAnimationPopup::onClose @ 0x14040a168
// > SetupAnimSettingsPopup::onClose @ 0x14040ab8f
// > SetupAreaTintTriggerPopup::onClose @ 0x1404108b5
// > SetupCameraEdgePopup::onClose @ 0x140413f04
// > SetupCameraOffsetTrigger::onClose @ 0x1404179dc
// > SetupCollisionTriggerPopup::onClose @ 0x140419e9c
// > SetupCountTriggerPopup::onClose @ 0x14041c8d5
// > SetupEnterEffectPopup::onClose @ 0x140420915
// > SetupInteractObjectPopup::onClose @ 0x140424519
// > SetupKeyframePopup::onClose @ 0x140426fa3
// > SetupMGTrigger::onClose @ 0x1404289a8
// > SetupPulsePopup::onClose @ 0x14043c155
// > SetupRandAdvTriggerPopup::onClose @ 0x14043de91
// > SetupRandTriggerPopup::onClose @ 0x140441465
// > SetupRotatePopup::onClose @ 0x140443070
// > SetupReverbPopup::onClose @ 0x140447110
// > SetupSFXPopup::onClose @ 0x140448831
// > SetupShakePopup::onClose @ 0x14045654c
// > SetupSongTriggerPopup::onClose @ 0x14045de87
// > SetupTouchTogglePopup::onClose @ 0x140464f1d
// > SelectEventLayer::onClose @ 0x14046774e
// > SetupStopTriggerPopup::onClose @ 0x140472e1c
// > ??> @ 0x14053f558
// > ??> @ 0x14053fad8
// > ??> @ 0x14056d030
// > ??> @ 0x1405728e8
// > ??> @ 0x1405736a8
// > ??> @ 0x1405766f8
// > ??> @ 0x140578f80
// > ??> @ 0x14057b2c8
// > ??> @ 0x14057bda0
// > ??> @ 0x14057d2c0
// > ??> @ 0x14058e288
// > ??> @ 0x14058f420
// > ??> @ 0x1405d6b08
// > ??> @ 0x1405d7e30
// > ??> @ 0x1405d9388
// > ??> @ 0x1405d9f38
// > ??> @ 0x1405dc280
// > ??> @ 0x1405dc718
// > ??> @ 0x1405dcca0
// > ??> @ 0x1405dd788
// > ??> @ 0x1405ddc98
// > ??> @ 0x1405e03b0
// > ??> @ 0x1405e1570
// > ??> @ 0x1405e1c40
// > ??> @ 0x1405e33a8
// > ??> @ 0x1405e4a70
// > ??> @ 0x1405e67e0
// > ??> @ 0x1405e7a38
// > ??> @ 0x1405e8068
// > ??> @ 0x1405ea8e8
// > ??> @ 0x1405eafc8
// > ??> @ 0x1405ed240
// > ??> @ 0x1405ed908
// > ??> @ 0x1405ee840
// > ??> @ 0x1405efc58
// > ??> @ 0x1405f00f0
// > ??> @ 0x1405f7e70
// > ??> @ 0x1405f8698
// > ??> @ 0x1405f8fb8
// > ??> @ 0x1405f97d8
// > ??> @ 0x1405f9c88
// > ??> @ 0x1405fb3b0
// > ??> @ 0x1405fd1a8
// > ??> @ 0x1405fd650
// > ??> @ 0x1405fde90
// > ??> @ 0x1405fe5e0
// > ??> @ 0x1405fec90
// > ??> @ 0x1405ff610
// > ??> @ 0x140600318
// > ??> @ 0x140600858
// > ??> @ 0x140600d08
// > ??> @ 0x140601550
// > ??> @ 0x140602048
// > ??> @ 0x140602550
// > ??> @ 0x1406029e8
// > ??> @ 0x140602ef8
// > ??> @ 0x140603448
// > ??> @ 0x140603c18
// > ??> @ 0x1406041e8
// > ??> @ 0x1406db624
//
// 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 SetupTriggerPopup::onClose(SetupTriggerPopup *a1, cocos2d::CCObject *a2)
{
cocos2d::CCArray *m_gameObjects; // rax
EffectGameObject *m_gameObject; // rcx
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCObject **arr; // rbx
cocos2d::CCObject **i; // rsi
cocos2d::CCObject *v9; // rcx
cocos2d::CCDictionary *m_inputNodes; // rcx
cocos2d::CCDictElement *m_pElements; // rcx
cocos2d::CCDictElement *j; // rbx
_QWORD *v13; // rcx
_BOOL8 v14; // rdx
void *v15; // [rsp+30h] [rbp+8h]
if ( !qword_1406C2ED8 )
{
v15 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
}
m_gameObjects = a1->m_gameObjects;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
if ( m_gameObject->m_dontIgnoreDuration )
cocos2d::CCPoint::operator=(&m_gameObject->m_endPosition, &dword_1406C2128);
}
else if ( m_gameObjects )
{
data = m_gameObjects->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v9 = *arr;
if ( !*arr )
break;
if ( HIBYTE(v9[22].m_eObjType) )
cocos2d::CCPoint::operator=(&v9[32].m_uAutoReleaseCount, &dword_1406C2128);
}
}
}
m_inputNodes = a1->m_inputNodes;
if ( m_inputNodes )
{
m_pElements = m_inputNodes->m_pElements;
if ( m_pElements )
{
for ( j = (cocos2d::CCDictElement *)m_pElements->hh.next; ; j = (cocos2d::CCDictElement *)j->hh.next )
{
v13 = &m_pElements->m_pObject->__vftable;
v13[70] = 0;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v13 + 1016LL))(v13, 0);
m_pElements = j;
if ( !j )
break;
}
}
}
SetupTriggerPopup::updateEditorLabel(a1);
a1->setKeypadEnabled(a1, 0);
LOBYTE(v14) = 1;
a1->removeFromParentAndCleanup(a1, v14);
}