//
// SetupEventLinkPopup::onSelectEvent from 0xa57fac to 0xa580c4 (280 bytes)
//
// 3 xrefs:
// > ??> @ 0x521d0
// > SetupEventLinkPopup::init @ 0xa4451c
// > ??> @ 0x122aa60
//
// 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 SetupEventLinkPopup::onSelectEvent(SetupEventLinkPopup *a1, cocos2d::CCObject *a2)
{
EffectGameObject *m_gameObject; // x1
SelectEventLayer *v4; // x0
std::_Rb_tree_node_base::_Base_ptr M_parent; // x19
std::_Rb_tree_node_base::_Base_ptr v6; // x0
__int64 v7; // x0
std::set v8; // [xsp+38h] [xbp+38h] BYREF
v8._M_t._M_impl._M_header._M_color = _S_red;
m_gameObject = a1->m_gameObject;
v8._M_t._M_impl._M_header._M_parent = nullptr;
v8._M_t._M_impl._M_node_count = 0;
v8._M_t._M_impl._M_header._M_left = &v8._M_t._M_impl._M_header;
v8._M_t._M_impl._M_header._M_right = &v8._M_t._M_impl._M_header;
if ( m_gameObject )
{
std::_Rb_tree,std::less,std::allocator>::operator=(
&v8,
(__int64)&m_gameObject[1]);
}
else if ( (unsigned int)cocos2d::CCArray::count(a1->m_gameObjects) )
{
v7 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, 0);
std::_Rb_tree,std::less,std::allocator>::operator=(&v8, v7 + 1824);
}
v4 = SelectEventLayer::create(a1, &v8);
v4->show(v4);
M_parent = v8._M_t._M_impl._M_header._M_parent;
while ( M_parent )
{
std::_Rb_tree,std::less,std::allocator>::_M_erase(
(__int64)&v8,
M_parent->_M_right);
v6 = M_parent;
M_parent = M_parent->_M_left;
operator delete(v6);
}
}