//
// EditorUI::setIDPopupClosed from 0x1003e9e84 to 0x1003ea004 (384 bytes)
//
// 2 xrefs:
// > sub_1003EA120 @ 0x1003ea124
// > ??> @ 0x100813fc0
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall EditorUI::setIDPopupClosed(EditorUI *a1, SetIDPopup *a2, int a3)
{
__int64 v3; // x20
GameManager *v6; // x0
ButtonSprite *m_deleteGroupSprite; // x19
cocos2d::CCString *v8; // x0
const char *CString; // x0
GameManager *v10; // x0
const char *v11; // x0
std::string *v12; // x1
std::string v13; // [xsp+8h] [xbp-58h] BYREF
std::string v14; // [xsp+20h] [xbp-40h] BYREF
v3 = *(_QWORD *)&a3;
if ( ((unsigned int (__fastcall *)(SetIDPopup *))a2->getTag)(a2) == 1 )
{
v6 = GameManager::sharedState();
GameManager::setIntGameVariable(v6, "0133", v3);
m_deleteGroupSprite = a1->m_deleteGroupSprite;
v8 = (cocos2d::CCString *)sub_100268F4C("%i", v3);
CString = cocos2d::CCString::getCString(v8);
ButtonSprite::setString(m_deleteGroupSprite, CString);
}
else if ( ((unsigned int (__fastcall *)(SetIDPopup *))a2->getTag)(a2) == 2 )
{
v10 = GameManager::sharedState();
GameManager::setIntGameVariable(v10, "0139", v3);
sub_100009900(&v14, "");
if ( (int)v3 < 1000 )
{
GameToolbox::intToString(v3, &v13);
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v14.__r_.__value_.__l.__data_);
v14 = v13;
}
else
{
v11 = GJSpecialColorSelect::textForColorIdx(v3);
std::string::assign(&v14, v11);
}
if ( (v14.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v12 = &v14;
else
v12 = (std::string *)v14.__r_.__value_.__r.__words[0];
ButtonSprite::setString(a1->m_deleteColorSprite, (const char *)v12);
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v14.__r_.__value_.__l.__data_);
}
else if ( ((unsigned int (__fastcall *)(SetIDPopup *))a2->getTag)(a2) == 3 )
{
EditorUI::findAndSelectObject(
a1,
v3,
(bool)a2[1].FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable);
}
}