//
// GameObject::deactivateObject from 0x140190b90 to 0x140190c7c (236 bytes)
//
// 6 xrefs:
// > ??> @ 0x140556828
// > ??> @ 0x140556f98
// > ??> @ 0x14055dfd0
// > ??> @ 0x1405c86e8
// > ??> @ 0x14060e1c8
// > ??> @ 0x1406cb964
//
// 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)
{
GameObject_vtbl *v3; // rax
bool v4; // zf
GameObject_vtbl *v5; // rax
cocos2d::CCSprite *m_glowSprite; // rcx
cocos2d::CCSprite *m_colorSprite; // rcx
if ( a2 )
a1->m_unk3ee = 1;
if ( a1->m_unk3ee )
{
if ( a1->m_isActivated )
{
v3 = a1->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_isActivated = 0;
v3->setVisible(a1, 0);
a1->removeFromParentAndCleanup(a1, 0);
v4 = a1->m_enterType == -1;
a1->m_baseOrDetailBlending = 0;
if ( !v4 || a1->m_exitType != -1 )
{
v5 = a1->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
*(_DWORD *)&a1->m_enterType = -1;
a1->m_unk3E8 = 1;
((void (__fastcall *)(GameObject *))v5->setRScaleX)(a1);
((void (__fastcall *)(GameObject *))a1->setRScaleY)(a1);
}
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 )
m_colorSprite->removeFromParentAndCleanup(m_colorSprite, 0);
}
}
}
else
{
a1->m_unk3ee = 1;
}
}