//
// AnimatedGameObject::setOpacity from 0x100383f28 to 0x100383fec (196 bytes)
//
// 2 xrefs:
// > sub_100383FEC @ 0x100383ff0
// > ??> @ 0x1007f5470
//
// 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 __fastcall AnimatedGameObject::setOpacity(AnimatedGameObject *a1, unsigned __int8 a2)
{
__int64 v3; // x19
cocos2d::CCSprite *m_childSprite; // x0
__int64 v5; // x20
unsigned int v6; // w21
__int64 v7; // x0
GameObject::setOpacity(a1, a2);
v3 = ((__int64 (__fastcall *)(AnimatedGameObject *))a1->getOpacity)(a1);
((void (__fastcall *)(CCAnimatedSprite *, __int64))a1->m_animatedSprite->setOpacity)(a1->m_animatedSprite, v3);
m_childSprite = a1->m_childSprite;
if ( m_childSprite )
{
if ( a1->m_hasNoGlow )
v3 = 0;
else
v3 = (unsigned int)v3;
((void (__fastcall *)(cocos2d::CCSprite *, __int64))m_childSprite->setOpacity)(m_childSprite, v3);
v5 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_childSprite->getChildren)(a1->m_childSprite);
if ( (unsigned int)sub_10024A36C(v5) )
{
v6 = 0;
do
{
v7 = sub_10024A388(v5, v6);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 896LL))(v7, v3);
++v6;
}
while ( v6 < (unsigned int)sub_10024A36C(v5) );
}
}
}