//
// CCMenuItemSpriteExtra::activate from 0x10021395c to 0x100213a20 (196 bytes)
//
// 2 xrefs:
// > ??> @ 0x1007c2cd8
// > ??> @ 0x100815898
//
// 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 CCMenuItemSpriteExtra::activate(CCMenuItemSpriteExtra *a1)
{
std::string *p_m_activateSound; // x21
FMODAudioEngine *v3; // x20
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v5; // [xsp+1Fh] [xbp-21h]
if ( a1->m_bEnabled )
{
cocos2d::CCNode::stopAllActions(a1);
if ( !a1->m_animationType )
((void (__fastcall *)(CCMenuItemSpriteExtra *, float))a1->setScale)(a1, a1->m_baseScale);
if ( (a1->m_activateSound.m_data.m_short.shortStorage.__elems_[22] & 0x8000000000000000LL) != 0 )
{
if ( !a1->m_activateSound.m_data.m_long.size )
{
LABEL_12:
cocos2d::CCMenuItem::activate(a1);
return;
}
}
else if ( !a1->m_activateSound.m_data.m_short.shortStorage.__elems_[22] )
{
goto LABEL_12;
}
p_m_activateSound = &a1->m_activateSound;
v3 = FMODAudioEngine::sharedEngine();
if ( a1->m_activateSound.m_data.m_short.shortStorage.__elems_[22] < 0 )
p_m_activateSound = (std::string *)p_m_activateSound->m_data.m_long.capacitym1;
sub_100009900(__p, (char *)p_m_activateSound);
FMODAudioEngine::playEffect((__int64)v3, (__int64)__p, 1.0, 0.0, a1->m_volume);
if ( v5 < 0 )
operator delete(__p[0]);
goto LABEL_12;
}
}