//
// GameObject::setVisible from 0x353070 to 0x353126 (182 bytes)
//
// 2 xrefs:
// > PlayerObject::setVisible @ 0x33bf7a
// > EndPortalObject::setVisible @ 0x3ff084
//
// 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::setVisible(GameObject *a1, bool a2)
{
_BOOL4 v3; // r5
cocos2d::CCParticleSystemQuad *m_particle; // r0
cocos2d::CCSprite *m_glowSprite; // r0
_BOOL4 v6; // r1
cocos2d::CCSprite *m_colorSprite; // r0
v3 = a2;
if ( a1->m_hasParticles && a2 != ((int (__fastcall *)(GameObject *))a1->isVisible)(a1) )
{
if ( v3 )
{
if ( !a1->m_particle )
a1->claimParticle(a1);
}
else
{
a1->unclaimParticle(a1);
}
m_particle = a1->m_particle;
if ( m_particle )
{
m_particle->setVisible(m_particle, v3);
if ( v3 )
{
if ( a1->m_objectID != 2065 || !((int (__fastcall *)(GameObject *))a1->getHasSyncedAnimation)(a1) )
cocos2d::CCParticleSystem::resetSystem(a1->m_particle);
a1->particleWasActivated(a1);
}
else
{
cocos2d::CCParticleSystem::stopSystem(a1->m_particle);
}
}
}
cocos2d::CCSprite::setVisible(a1, v3);
m_glowSprite = a1->m_glowSprite;
if ( m_glowSprite )
{
v6 = v3 && !a1->m_hasNoGlow;
m_glowSprite->setVisible(m_glowSprite, v6);
}
m_colorSprite = a1->m_colorSprite;
if ( m_colorSprite )
m_colorSprite->setVisible(m_colorSprite, v3);
}