//
// cocos2d::CCMenuItemSprite::setSelectedImage from 0x5d4e54 to 0x5d4ec8 (116 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::CCMenuItemSprite::setSelectedImage(cocos2d::CCMenuItemSprite *a1, cocos2d::CCNode *a2)
{
void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCNode *m_pSelectedImage; // r1
cocos2d::CCMenuItemSprite_vtbl *v6; // r3
cocos2d::CCPoint v7; // [sp+4h] [bp-Ch] BYREF
int v8; // [sp+Ch] [bp-4h]
LODWORD(v7.x) = a2;
if ( a2 != a1->m_pNormalImage )
{
if ( a2 )
{
((void (__fastcall *)(cocos2d::CCMenuItemSprite *, cocos2d::CCNode *, _DWORD, int, cocos2d::CCMenuItemSprite *, _DWORD, _DWORD, int))a1->addChild_1)(
a1,
a2,
0,
2,
a1,
LODWORD(v7.x),
LODWORD(v7.y),
v8);
setAnchorPoint = a2->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v7, 0.0, 0.0);
setAnchorPoint(a2, &v7);
}
m_pSelectedImage = a1->m_pSelectedImage;
if ( m_pSelectedImage )
a1->removeChild_0(a1, m_pSelectedImage, 1);
v6 = a1->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_pSelectedImage = a2;
v6->updateImagesVisibility(a1);
}
}