//
// cocos2d::CCMenuItem::activate from 0xaf520c to 0xaf529c (144 bytes)
//
// 9 xrefs:
// > CCMenuItemSpriteExtra::activate @ 0x575f2c
// > CCMenuItemToggler::activate @ 0x5766b4
// > cocos2d::CCMenuItemToggle::activate @ 0xaf52e8
// > cocos2d::CCMenuItemLabel::activate @ 0xaf5334
// > ??> @ 0xbf610
// > ??> @ 0x113f6b0
// > ??> @ 0x120f750
// > ??> @ 0x12100d0
// > ??> @ 0x12105c0
//
// 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::CCMenuItem::activate(cocos2d::CCMenuItem *a1)
{
cocos2d::CCObject *m_pListener; // x3
void (__cdecl *ptr)(cocos2d::CCObject *); // x2
signed __int64 adj; // x0
cocos2d::CCScriptEngineManager *v5; // x0
if ( a1->m_bEnabled )
{
m_pListener = a1->m_pListener;
if ( !m_pListener )
goto LABEL_6;
ptr = a1->m_pfnSelector.ptr;
adj = a1->m_pfnSelector.adj;
if ( ptr )
{
if ( (adj & 1) == 0 )
{
((void (__fastcall *)(char *, cocos2d::CCMenuItem *))ptr)((char *)m_pListener + (adj >> 1), a1);
goto LABEL_6;
}
}
else if ( (adj & 1) == 0 )
{
goto LABEL_6;
}
(*(void (__fastcall **)(__int64, cocos2d::CCMenuItem *))((char *)&(*(cocos2d::CCObject_vtbl **)((char *)&m_pListener->__vftable
+ (adj >> 1)))->copyWithZone
+ (unsigned __int64)ptr))(
(__int64)m_pListener + (adj >> 1),
a1);
LABEL_6:
if ( a1->m_eScriptType )
{
v5 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, cocos2d::CCMenuItem *))(**(_QWORD **)v5 + 80LL))(*(_QWORD *)v5, a1);
}
}
}