//
// GameObject::deactivateObject from 0x6414e8 to 0x6415e4 (252 bytes)
//
// 7 xrefs:
// > EnhancedGameObject::deactivateObject @ 0x641bbc
// > ??> @ 0x501a8
// > ??> @ 0x1152bf0
// > ??> @ 0x11539c0
// > ??> @ 0x1154990
// > ??> @ 0x1165b40
// > ??> @ 0x1177380
//
// 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 GameObject::deactivateObject(GameObject *a1, bool a2)
{
void (__fastcall *setVisible)(GameObject *__hidden, bool); // x2
GameObject_vtbl *v4; // x2
void (__fastcall *setRScaleX)(GameObject *__hidden, float); // x1
cocos2d::CCSprite *m_glowSprite; // x0
cocos2d::CCSprite *m_colorSprite; // x0
if ( a2 )
{
a1->m_unk3ee = 1;
}
else if ( !a1->m_unk3ee )
{
a1->m_unk3ee = 1;
return;
}
if ( a1->m_isActivated )
{
setVisible = a1->setVisible;
a1->m_isActivated = 0;
setVisible(a1, 0);
a1->removeFromParentAndCleanup(a1, 0);
a1->m_baseOrDetailBlending = 0;
if ( *(_DWORD *)&a1->m_enterType != -1 )
{
v4 = a1->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_enterType = -1;
a1->m_exitType = -1;
setRScaleX = v4->setRScaleX;
a1->m_unk3E8 = 1;
setRScaleX(a1, 1.0);
a1->setRScaleY(a1, 1.0);
}
m_glowSprite = a1->m_glowSprite;
if ( m_glowSprite )
m_glowSprite->removeFromParentAndCleanup(m_glowSprite, 0);
m_colorSprite = a1->m_colorSprite;
if ( m_colorSprite )
{
if ( !a1->m_unk28c )
((void (__fastcall *)(cocos2d::CCSprite *))m_colorSprite->removeFromParentAndCleanup)(m_colorSprite);
}
}
}