//
// CCMenuItemSpriteExtra::init from 0x1002137d0 to 0x10021390c (316 bytes)
//
// 3 xrefs:
// > InfoAlertButton::init @ 0x10016b3e8
// > CCMenuItemSpriteExtra::create @ 0x10021377c
// > CreateMenuItem::create @ 0x1003e73d8
//
// 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 __fastcall CCMenuItemSpriteExtra::init(
CCMenuItemSpriteExtra *a1,
cocos2d::CCNode *a2,
cocos2d::CCNode *a3,
cocos2d::CCObject *a4,
cocos2d::SEL_MenuHandler a5)
{
_BOOL4 v7; // w21
__n128 v8; // q0
__n128 v9; // q1
float v10; // s8
float v11; // s8
float v12; // s9
float v13; // s0
cocos2d::CCNode *v14; // x0
int v16; // [xsp+8h] [xbp-38h] BYREF
cocos2d::CCPoint v17; // 0:kr00_8.8
v7 = cocos2d::CCMenuItemSprite::initWithNormalSprite(a1, a2, a3, nullptr, a4, a5);
if ( v7 )
{
a1->m_baseScale = 1.0;
v8.n128_u32[0] = 0.5;
v9.n128_u32[0] = 0.5;
sub_100022980(v8, v9, &v16);
((void (__fastcall *)(cocos2d::CCNode *, int *))a2->setAnchorPoint)(a2, &v16);
v10 = *(float *)((__int64 (__fastcall *)(cocos2d::CCNode *))a2->getContentSize)(a2);
v11 = v10 * ((float (__fastcall *)(cocos2d::CCNode *))a2->getScaleX)(a2);
v12 = *(float *)(((__int64 (__fastcall *)(cocos2d::CCNode *))a2->getContentSize)(a2) + 4);
v13 = ((float (__fastcall *)(cocos2d::CCNode *))a2->getScaleY)(a2);
sub_100022988((float *)&v16, v11, v12 * v13);
((void (__fastcall *)(CCMenuItemSpriteExtra *, int *))a1->setContentSize)(a1, &v16);
v14 = (cocos2d::CCNode *)((__int64 (__fastcall *)(cocos2d::CCNode *))a2->getParent)(a2);
v17 = cocos2d::CCNode::convertToNodeSpace(v14, &stru_10086CA50);
((void (__fastcall *)(cocos2d::CCNode *, int *, float, float))a2->setPosition)(a2, &v16, v17.x, v17.y);
a1->m_animationEnabled = 1;
a1->m_scaleMultiplier = 1.26;
}
return v7;
}