//
// cocos2d::CCMenuItemSprite::setSelectedImage from 0x1003bfc40 to 0x1003bfcd4 (148 bytes)
//
// 6 xrefs:
// > ??> @ 0x1008b1ef0
// > ??> @ 0x1008ef6c0
// > ??> @ 0x10090cc98
// > ??> @ 0x10092c2d0
// > ??> @ 0x10092c7d0
// > ??> @ 0x100965838
//
// 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 cocos2d::CCMenuItemSprite::setSelectedImage(cocos2d::CCMenuItemSprite *a1, cocos2d::CCNode *a2)
{
__int64 v2; // rax
cocos2d::CCNode *m_pSelectedImage; // rsi
_QWORD v5[5]; // [rsp-28h] [rbp-28h] BYREF
if ( a1->m_pNormalImage != a2 )
{
v5[0] = v2;
if ( a2 )
{
((void (__fastcall *)(cocos2d::CCMenuItemSprite *, cocos2d::CCNode *, _QWORD, __int64))a1->addChild_1)(
a1,
a2,
0,
2);
sub_10028CBE0((float *)v5, 0.0, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, _QWORD *))a2->setAnchorPoint)(a2, v5);
}
m_pSelectedImage = a1->m_pSelectedImage;
if ( m_pSelectedImage )
((void (__fastcall *)(cocos2d::CCMenuItemSprite *, cocos2d::CCNode *, __int64))a1->removeChild_0)(
a1,
m_pSelectedImage,
1);
a1->m_pSelectedImage = a2;
((void (__fastcall *)(cocos2d::CCMenuItemSprite *))a1->updateImagesVisibility)(a1);
}
}