//
// AnimatedGameObject::setOpacity from 0x1406459f0 to 0x140645ac0 (208 bytes)
//
// 4 xrefs:
// > ??> @ 0x140821150
// > ??> @ 0x1408e88ac
// > ??> @ 0x1408e88bc
// > ??> @ 0x1409313a0
//
// 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:35:36 +0000
//
unsigned int __fastcall AnimatedGameObject::setOpacity(__int64 a1, int a2)
{
__int64 v3; // rbp
unsigned int result; // eax
__int64 v5; // rcx
unsigned int v6; // ebx
unsigned __int8 v7; // si
cocos2d::CCArray *v8; // rdi
struct cocos2d::CCObject *v9; // rax
GameObject::setOpacity(a1, a2);
v3 = (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 32LL))(a1);
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)(a1 + 1160) + 320LL) + 40LL))(
*(_QWORD *)(a1 + 1160) + 320LL,
v3);
v5 = *(_QWORD *)(a1 + 1168);
if ( v5 )
{
v6 = 0;
v7 = 0;
if ( !*(_BYTE *)(a1 + 708) )
v7 = v3;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(v5 + 320) + 40LL))(v5 + 320, v7);
v8 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1168) + 480LL))(*(_QWORD *)(a1 + 1168));
result = cocos2d::CCArray::count(v8);
if ( result )
{
do
{
v9 = cocos2d::CCArray::objectAtIndex(v8, v6);
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)v9 + 40) + 40LL))((__int64)v9 + 320, v7);
++v6;
result = cocos2d::CCArray::count(v8);
}
while ( v6 < result );
}
}
return result;
}