//
// cocos2d::CCMenuItemToggle::initWithTarget from 0x5d5f90 to 0x5d5fde (78 bytes)
//
// 1 xrefs:
// > cocos2d::CCMenuItemToggle::createWithTarget @ 0x5d603e
//
// 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 cocos2d::CCMenuItemToggle::initWithTarget(
cocos2d::CCMenuItemToggle *a1,
cocos2d::CCObject *a2,
cocos2d::SEL_MenuHandler a3,
cocos2d::CCMenuItem *a4,
va_list a5)
{
_BOOL4 v7; // r0
cocos2d::CCArray *v8; // r0
cocos2d::CCObject *v9; // r2
char *v10; // r6
cocos2d::CCMenuItem *v11; // t1
v7 = cocos2d::CCMenuItem::initWithTarget(a1, a2, a3);
v8 = cocos2d::CCArray::create((cocos2d::CCArray *)v7);
a1[1].m_uID = (unsigned int)v8;
cocos2d::CCObject::retain(v8);
v10 = (char *)a5 - 4;
while ( a4 )
{
cocos2d::CCArray::addObject((cocos2d::CCArray *)a1[1].m_uID, (cocos2d::_ccArray *)a4, v9);
v11 = *((cocos2d::CCMenuItem **)v10 + 1);
v10 += 4;
a4 = v11;
}
a1[1].cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCMenuItemToggle_vtbl *)-1;
a1->setSelectedIndex(a1, 0);
return 1;
}