//
// SetupArtSwitchPopup::selectArtClosed from 0x100585f20 to 0x100585fad (141 bytes)
//
// 2 xrefs:
// > sub_100585FD0 @ 0x100585fdc
// > ??> @ 0x10096abb0
//
// 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 SetupArtSwitchPopup::selectArtClosed(SetupArtSwitchPopup *a1, SelectArtLayer *a2)
{
double v2; // xmm0_8
int m_art; // r12d
cocos2d::CCSprite *m_artSprite; // rbx
cocos2d::CCSpriteFrameCache *v5; // r14
const char *v6; // rsi
cocos2d::CCSpriteFrame *v7; // rax
char v8; // [rsp+8h] [rbp-38h] BYREF
char v9; // [rsp+9h] [rbp-37h] BYREF
void *__p; // [rsp+18h] [rbp-28h]
m_art = a2->m_art;
*(float *)&v2 = (float)m_art;
SetupTriggerPopup::updateValue(a1, 533, (float)m_art);
m_artSprite = a1->m_artSprite;
v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
sub_100585DA0(&v8, v2, (unsigned int)m_art, a1->m_artType);
if ( (v8 & 1) != 0 )
v6 = (const char *)__p;
else
v6 = &v9;
v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v5, v6);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_artSprite->setDisplayFrame)(m_artSprite, v7);
if ( (v8 & 1) != 0 )
operator delete(__p);
}