//
// AnimatedGameObject::setOpacity from 0x1404a3cc0 to 0x1404a3d90 (208 bytes)
//
// 4 xrefs:
// > ??> @ 0x14060ec58
// > ??> @ 0x1406a7e00
// > ??> @ 0x1406a7e10
// > ??> @ 0x1406dc80c
//
// 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 AnimatedGameObject::setOpacity(AnimatedGameObject *a1, unsigned __int8 a2)
{
__int64 v3; // rbp
std::array *m_groups; // rcx
unsigned int v5; // ebx
unsigned __int8 v6; // si
cocos2d::CCArray *v7; // rdi
struct cocos2d::CCObject *v8; // rax
GameObject::setOpacity(a1, a2);
v3 = ((unsigned __int8 (__fastcall *)(AnimatedGameObject *))a1->update)(a1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)&a1->m_scaleX + 320LL) + 40LL))(
*(_QWORD *)&a1->m_scaleX + 320LL,
v3);
m_groups = a1->m_groups;
if ( m_groups )
{
v5 = 0;
v6 = 0;
if ( !LOBYTE(a1->m_unk2C0) )
v6 = v3;
(*(void (__fastcall **)(__int16 *, _QWORD))(*(_QWORD *)m_groups[16]._Elems + 40LL))(m_groups[16]._Elems, v6);
v7 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(std::array *))(*(_QWORD *)a1->m_groups + 464LL))(a1->m_groups);
if ( cocos2d::CCArray::count(v7) )
{
do
{
v8 = cocos2d::CCArray::objectAtIndex(v7, v5);
(*(void (__fastcall **)(int *, _QWORD))(*(_QWORD *)&v8[5].m_unknown2 + 40LL))(&v8[5].m_unknown2, v6);
++v5;
}
while ( v5 < cocos2d::CCArray::count(v7) );
}
}
}