//
// GameObject::setVisible from 0x10068e170 to 0x10068e2c7 (343 bytes)
//
// 48 xrefs:
// > EndPortalObject::setVisible @ 0x1003863b2
// > PlayerObject::setVisible @ 0x10040a3d4
// > ??> @ 0x100ac7800
// > ??> @ 0x100ac8048
// > ??> @ 0x100ac8850
// > ??> @ 0x100ac9058
// > ??> @ 0x100ac9860
// > ??> @ 0x100aca068
// > ??> @ 0x100aca870
// > ??> @ 0x100acb078
// > ??> @ 0x100acb870
// > ??> @ 0x100acc090
// > ??> @ 0x100acc918
// > ??> @ 0x100acd138
// > ??> @ 0x100acd958
// > ??> @ 0x100ace178
// > ??> @ 0x100ace998
// > ??> @ 0x100acf1b8
// > ??> @ 0x100acf9d8
// > ??> @ 0x100ad01f8
// > ??> @ 0x100ad0a18
// > ??> @ 0x100ad1238
// > ??> @ 0x100ad1a70
// > ??> @ 0x100ad22d8
// > ??> @ 0x100ad2b10
// > ??> @ 0x100ad3348
// > ??> @ 0x100ad3b80
// > ??> @ 0x100ad43b8
// > ??> @ 0x100ad4bd8
// > ??> @ 0x100ad53f8
// > ??> @ 0x100ad5c18
// > ??> @ 0x100ad6438
// > ??> @ 0x100ad6c58
// > ??> @ 0x100ad7478
// > ??> @ 0x100ad7c98
// > ??> @ 0x100ad84b8
// > ??> @ 0x100ad8cd8
// > ??> @ 0x100ad94f8
// > ??> @ 0x100ad9d18
// > ??> @ 0x100ada538
// > ??> @ 0x100adad58
// > ??> @ 0x100adb578
// > ??> @ 0x100adbd98
// > ??> @ 0x100adc5b8
// > ??> @ 0x100adcdd8
// > ??> @ 0x100b83fc8
// > ??> @ 0x100b847c0
// > ??> @ 0x100b84fe0
//
// 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 12:35:06 +0000
//
void __fastcall GameObject::setVisible(__int64 a1, unsigned __int8 a2)
{
__int64 v3; // rax
__int64 v4; // rdi
__int64 v5; // rdi
unsigned __int8 v6; // r15
__int64 v7; // rdi
if ( *(_BYTE *)(a1 + 808) != 1 || (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1) == a2 )
{
LABEL_14:
cocos2d::CCSprite::setVisible(a1, a2);
v5 = *(_QWORD *)(a1 + 752);
if ( !v5 )
goto LABEL_19;
if ( !a2 )
{
v6 = 0;
goto LABEL_18;
}
goto LABEL_16;
}
v3 = 1408;
if ( a2 )
{
if ( *(_QWORD *)(a1 + 776) )
goto LABEL_7;
v3 = 1400;
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + v3))(a1);
LABEL_7:
v4 = *(_QWORD *)(a1 + 776);
if ( !v4 )
goto LABEL_14;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 344LL))(v4, a2);
if ( !a2 )
{
cocos2d::CCParticleSystem::stopSystem(*(_QWORD *)(a1 + 776));
v6 = 0;
cocos2d::CCSprite::setVisible(a1, 0);
v5 = *(_QWORD *)(a1 + 752);
if ( !v5 )
goto LABEL_19;
LABEL_18:
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 344LL))(v5, v6);
goto LABEL_19;
}
if ( *(_DWORD *)(a1 + 1028) != 2065 || !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1728LL))(a1) )
cocos2d::CCParticleSystem::resetSystem(*(_QWORD *)(a1 + 776));
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1416LL))(a1);
cocos2d::CCSprite::setVisible(a1, 1);
v5 = *(_QWORD *)(a1 + 752);
if ( v5 )
{
LABEL_16:
v6 = *(_BYTE *)(a1 + 1020) ^ 1;
goto LABEL_18;
}
LABEL_19:
v7 = *(_QWORD *)(a1 + 888);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 344LL))(v7, a2);
}