//
// CCPartAnimSprite::setOpacity from 0x14004a640 to 0x14004a70f (207 bytes)
//
// 4 xrefs:
// > ??> @ 0x140709df8
// > ??> @ 0x140885d34
// > ??> @ 0x140885d44
// > ??> @ 0x14090fd40
//
// 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:25:32 +0000
//
__int64 __fastcall CCPartAnimSprite::setOpacity(cocos2d::CCSprite *a1, unsigned __int8 a2)
{
char *v4; // rsi
__int64 result; // rax
unsigned __int64 v6; // rbx
__int64 v7; // rdi
unsigned __int64 i; // rdi
cocos2d::CCSprite::setOpacity(a1, a2);
v4 = (char *)a1 - 320;
result = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v4 + 480LL))(v4);
if ( result )
{
result = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v4 + 480LL))(v4);
if ( **(_DWORD **)(result + 56) )
{
v6 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v4 + 480LL))(v4) + 56) + 16LL);
v7 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v4 + 480LL))(v4) + 56) + 16LL);
result = **(unsigned int **)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v4 + 480LL))(v4) + 56);
for ( i = v7 + 8 * result - 8; v6 <= i; v6 += 8LL )
{
if ( !*(_QWORD *)v6 )
break;
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)v6 + 320LL) + 40LL))(
*(_QWORD *)v6 + 320LL,
a2);
}
}
}
return result;
}