//
// AnimatedGameObject::setOpacity from 0x1001b73a0 to 0x1001b7452 (178 bytes)
//
// 2 xrefs:
// > sub_1001B7460 @ 0x1001b746c
// > ??> @ 0x1008c43e8
//
// 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; // r14
cocos2d::CCSprite *m_childSprite; // rdi
unsigned int v5; // ebx
__int64 v6; // r15
__int64 v7; // rax
GameObject::setOpacity(a1, a2);
v3 = ((unsigned __int8 (__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 )
{
v5 = 0;
if ( a1->m_hasNoGlow )
LOBYTE(v3) = 0;
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))m_childSprite->setOpacity)(m_childSprite, (unsigned __int8)v3);
v6 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_childSprite->getChildren)(a1->m_childSprite);
if ( (unsigned int)sub_100720070(v6) )
{
do
{
v7 = sub_1007200C0(v6, v5);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 896LL))(v7, (unsigned __int8)v3);
++v5;
}
while ( v5 < (unsigned int)sub_100720070(v6) );
}
}
}