//
// cocos2d::extension::CCScale9Sprite::setOpacity from 0xaa2358 to 0xaa2414 (188 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'cocos2d::extension::CCScale9Sprite::setOpacity @ 0xaa2418
// > ??> @ 0x93eb8
// > ??> @ 0x11f8180
//
// 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 cocos2d::extension::CCScale9Sprite::setOpacity(cocos2d::extension::CCScale9Sprite *a1, unsigned __int8 a2)
{
unsigned int v2; // w21
cocos2d::CCSpriteBatchNode *scale9Image; // x1
__int64 v4; // x0
unsigned int *v5; // x1
const void **v6; // x19
const void **v7; // x20
const void *i; // x0
void *v9; // x0
v2 = a2;
scale9Image = a1->_scale9Image;
if ( scale9Image )
{
a1->_opacity = v2;
v4 = (__int64)scale9Image->getChildren(scale9Image);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
if ( *v5 )
{
v6 = *((const void ***)v5 + 2);
v7 = &v6[*v5 - 1];
if ( v6 <= v7 )
{
for ( i = *v6; *v6; i = *v6 )
{
v9 = _dynamic_cast(
i,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( v9 )
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v9 + 40LL))(v9, v2);
if ( v7 < ++v6 )
break;
}
}
}
}
}
}