//
// CCMenuItemSpriteExtra::init from 0x576208 to 0x576370 (360 bytes)
//
// 4 xrefs:
// > CCMenuItemSpriteExtra::create @ 0x576478
// > CreateMenuItem::init @ 0x69443c
// > InfoAlertButton::init @ 0x8e634c
// > ??> @ 0xbd7c8
//
// 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
//
bool CCMenuItemSpriteExtra::init(
CCMenuItemSpriteExtra *a1,
cocos2d::CCNode *a2,
cocos2d::CCNode *a3,
cocos2d::CCObject *a4,
cocos2d::SEL_MenuHandler a5)
{
bool v7; // w22
void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x24
float width; // s9
float v11; // s9
float height; // s8
float v13; // s0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
cocos2d::CCNode *v15; // x0
cocos2d::CCPoint v17; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCPoint v18; // 0:kr00_8.8
v7 = cocos2d::CCMenuItemSprite::initWithNormalSprite(a1, a2, a3, nullptr, a4, a5);
if ( v7 )
{
setAnchorPoint = a2->setAnchorPoint;
a1->m_baseScale = 1.0;
cocos2d::CCPoint::CCPoint(&v17, 0.5, 0.5);
setAnchorPoint(a2, &v17);
setContentSize = a1->setContentSize;
width = a2->getContentSize(a2)->width;
v11 = width * a2->getScaleX(a2);
height = a2->getContentSize(a2)->height;
v13 = a2->getScaleY(a2);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v17, v11, height * v13);
setContentSize(a1, (const cocos2d::CCSize *)&v17);
setPosition = a2->setPosition;
v15 = a2->getParent(a2);
v18 = cocos2d::CCNode::convertToNodeSpace(v15, &stru_1241610);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *, float, float))setPosition)(a2, &v17, v18.x, v18.y);
a1->m_animationEnabled = 1;
a1->m_scaleMultiplier = 1.26;
}
return v7;
}