//
// GameObject::setVisible from 0x641070 to 0x641204 (404 bytes)
//
// 48 xrefs:
// > PlayerObject::setVisible @ 0x620e68
// > EndPortalObject::setVisible @ 0x78aa3c
// > ??> @ 0x51c18
// > ??> @ 0x11535f8
// > ??> @ 0x1153dc8
// > ??> @ 0x11545c8
// > ??> @ 0x1161f78
// > ??> @ 0x1162778
// > ??> @ 0x1162f78
// > ??> @ 0x1163778
// > ??> @ 0x1163f78
// > ??> @ 0x1164778
// > ??> @ 0x1164f78
// > ??> @ 0x1165778
// > ??> @ 0x1165f48
// > ??> @ 0x1166748
// > ??> @ 0x1166f48
// > ??> @ 0x1167748
// > ??> @ 0x1167f48
// > ??> @ 0x1168788
// > ??> @ 0x1168f88
// > ??> @ 0x1169788
// > ??> @ 0x1169f88
// > ??> @ 0x116a788
// > ??> @ 0x116af98
// > ??> @ 0x116b798
// > ??> @ 0x116bf98
// > ??> @ 0x116c798
// > ??> @ 0x116cf98
// > ??> @ 0x116d798
// > ??> @ 0x116df98
// > ??> @ 0x116e798
// > ??> @ 0x116ef98
// > ??> @ 0x116f798
// > ??> @ 0x116ff98
// > ??> @ 0x1170798
// > ??> @ 0x1170f98
// > ??> @ 0x1171798
// > ??> @ 0x1171f98
// > ??> @ 0x1172798
// > ??> @ 0x1172f98
// > ??> @ 0x1173798
// > ??> @ 0x1173f98
// > ??> @ 0x1174798
// > ??> @ 0x1174f98
// > ??> @ 0x1175798
// > ??> @ 0x1175f98
// > ??> @ 0x1176798
//
// 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 v2; // w20
cocos2d::CCSprite *m_glowSprite; // x0
void (*setVisible)(void); // x2
cocos2d::CCSprite *m_colorSprite; // x0
cocos2d::CCParticleSystemQuad *v7; // x0
cocos2d::CCSprite *v8; // x0
cocos2d::CCParticleSystemQuad *m_particle; // x0
cocos2d::CCSprite *v10; // x0
cocos2d::CCSprite *v11; // x0
v2 = a2;
if ( !a1->m_hasParticles || a2 == a1->isVisible(a1) )
{
cocos2d::CCSprite::setVisible(a1, v2);
m_glowSprite = a1->m_glowSprite;
if ( !m_glowSprite )
goto LABEL_5;
setVisible = (void (*)(void))m_glowSprite->setVisible;
goto LABEL_4;
}
if ( v2 )
{
m_particle = a1->m_particle;
if ( m_particle || (a1->claimParticle(a1), (m_particle = a1->m_particle) != nullptr) )
{
m_particle->setVisible(m_particle, 1);
if ( a1->m_objectID != 2065 || !a1->getHasSyncedAnimation(a1) )
cocos2d::CCParticleSystem::resetSystem(a1->m_particle);
a1->particleWasActivated(a1);
}
cocos2d::CCSprite::setVisible(a1, 1);
v10 = a1->m_glowSprite;
if ( v10 )
{
setVisible = (void (*)(void))v10->setVisible;
goto LABEL_4;
}
}
else
{
a1->unclaimParticle(a1);
v7 = a1->m_particle;
if ( v7 )
{
v7->setVisible(v7, 0);
cocos2d::CCParticleSystem::stopSystem(a1->m_particle);
cocos2d::CCSprite::setVisible(a1, 0);
v11 = a1->m_glowSprite;
if ( v11 )
{
setVisible = (void (*)(void))v11->setVisible;
goto LABEL_4;
}
}
else
{
cocos2d::CCSprite::setVisible(a1, 0);
v8 = a1->m_glowSprite;
if ( v8 )
{
setVisible = (void (*)(void))v8->setVisible;
LABEL_4:
setVisible();
}
}
}
LABEL_5:
m_colorSprite = a1->m_colorSprite;
if ( m_colorSprite )
m_colorSprite->setVisible(m_colorSprite, v2);
}