//
// GameObject::setVisible from 0x140295d10 to 0x140295e24 (276 bytes)
//
// 48 xrefs:
// > EndPortalObject::setVisible @ 0x140209577
// > PlayerObject::setVisible @ 0x140501f85
// > ??> @ 0x1407547b8
// > ??> @ 0x14075e300
// > ??> @ 0x14075ea08
// > ??> @ 0x14081ee10
// > ??> @ 0x14081f540
// > ??> @ 0x14081fd88
// > ??> @ 0x1408204e0
// > ??> @ 0x140820b98
// > ??> @ 0x140821300
// > ??> @ 0x1408219b8
// > ??> @ 0x140822098
// > ??> @ 0x140822750
// > ??> @ 0x140823060
// > ??> @ 0x1408237a8
// > ??> @ 0x140823e60
// > ??> @ 0x140824658
// > ??> @ 0x140824d10
// > ??> @ 0x1408253c8
// > ??> @ 0x140825c38
// > ??> @ 0x140826430
// > ??> @ 0x140826bd8
// > ??> @ 0x140827308
// > ??> @ 0x1408279c0
// > ??> @ 0x140828118
// > ??> @ 0x140828960
// > ??> @ 0x140829018
// > ??> @ 0x140829798
// > ??> @ 0x140829f18
// > ??> @ 0x14082a5d0
// > ??> @ 0x14082ac88
// > ??> @ 0x14082b698
// > ??> @ 0x14082bdc8
// > ??> @ 0x14082c480
// > ??> @ 0x14082cb38
// > ??> @ 0x14082d1f0
// > ??> @ 0x14082d9c0
// > ??> @ 0x14082e168
// > ??> @ 0x14082e820
// > ??> @ 0x14082eed8
// > ??> @ 0x14082f590
// > ??> @ 0x14082fc48
// > ??> @ 0x140830300
// > ??> @ 0x1408309b8
// > ??> @ 0x1408311d8
// > ??> @ 0x140831958
// > ??> @ 0x14091d63c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:29:10 +0000
//
void __fastcall GameObject::setVisible(__int64 a1, unsigned __int8 a2)
{
__int64 v4; // rcx
__int64 v5; // rdx
__int64 v6; // rcx
__int64 v7; // rcx
if ( *(_BYTE *)(a1 + 816) && a2 != (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 344LL))(a1) )
{
if ( a2 )
{
if ( !*(_QWORD *)(a1 + 776) )
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1248LL))(a1);
}
else
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1256LL))(a1);
}
v4 = *(_QWORD *)(a1 + 776);
if ( v4 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 336LL))(v4, a2);
if ( a2 )
{
if ( *(_DWORD *)(a1 + 1036) != 2065
|| !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1576LL))(a1) )
{
cocos2d::CCParticleSystem::resetSystem(*(cocos2d::CCParticleSystem **)(a1 + 776));
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1264LL))(a1);
}
else
{
cocos2d::CCParticleSystem::stopSystem(*(cocos2d::CCParticleSystem **)(a1 + 776));
}
}
}
cocos2d::CCSprite::setVisible((cocos2d::CCSprite *)a1, a2);
v6 = *(_QWORD *)(a1 + 752);
if ( v6 )
{
if ( !a2 || *(_BYTE *)(a1 + 1028) )
v5 = 0;
else
LOBYTE(v5) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 336LL))(v6, v5);
}
v7 = *(_QWORD *)(a1 + 896);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 336LL))(v7, a2);
}