//
// cocos2d::CCMenuItemSprite::setNormalImage from 0x18005b9f0 to 0x18005baa1 (177 bytes)
//
// 6 xrefs:
// > ??> @ 0x1800f8710
// > ??> @ 0x1800f8b70
// > ??> @ 0x180138d7c
// > ??> @ 0x180138d8c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b2f10
//
// 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::setNormalImage(
cocos2d::CCMenuItemSprite *this,
struct cocos2d::CCNode *a2,
__int64 a3)
{
cocos2d::CCNode_vtbl *v5; // rbx
float *v6; // rax
__int64 v7; // rdx
cocos2d::CCMenuItemSprite_vtbl *v8; // rbx
__int64 v9; // rax
float v10; // [rsp+30h] [rbp+8h] BYREF
if ( a2 != *(struct cocos2d::CCNode **)&this->m_nScriptTapHandler )
{
if ( a2 )
{
((void (__fastcall *)(cocos2d::CCMenuItemSprite *, struct cocos2d::CCNode *, _QWORD, __int64))this->addChild)(
this,
a2,
0,
1);
v5 = a2->__vftable;
v6 = kmVec2Fill(&v10, 0.0, 0.0);
((void (__fastcall *)(struct cocos2d::CCNode *, float *))v5->setAnchorPoint)(a2, v6);
}
v7 = *(_QWORD *)&this->m_nScriptTapHandler;
if ( v7 )
{
LOBYTE(a3) = 1;
((void (__fastcall *)(cocos2d::CCMenuItemSprite *, __int64, __int64))this->removeChild)(this, v7, a3);
}
v8 = this->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
*(_QWORD *)&this->m_nScriptTapHandler = a2;
v9 = ((__int64 (__fastcall *)(struct cocos2d::CCNode *))a2->getContentSize)(a2);
((void (__fastcall *)(cocos2d::CCMenuItemSprite *, __int64))v8->setContentSize)(this, v9);
((void (__fastcall *)(cocos2d::CCMenuItemSprite *))this->updateImagesVisibility)(this);
}
}