//
// CCPartAnimSprite::setColor from 0x10035e910 to 0x10035e9d8 (200 bytes)
//
// 4 xrefs:
// > CCAnimatedSprite::switchToMode @ 0x10033c0a2
// > CCAnimatedSprite::setColor @ 0x10033c7bd
// > sub_10033C7E0 @ 0x10033c81d
// > GJRobotSprite::updateColors @ 0x1006ae668
//
// 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 12:28:55 +0000
//
__int64 __fastcall CCPartAnimSprite::setColor(__int64 a1, int a2)
{
__int64 v2; // rax
__int64 result; // rax
_QWORD *v4; // r14
__int64 v5; // r15
unsigned __int64 i; // r15
__int16 v7; // [rsp+0h] [rbp-1Ch] BYREF
char v8; // [rsp+2h] [rbp-1Ah]
char v9; // [rsp+3h] [rbp-19h]
v9 = HIBYTE(v2);
v7 = a2;
v8 = BYTE2(a2);
cocos2d::CCSprite::setColor(a1, (__int64)&v7);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 488LL))(a1);
if ( result )
{
result = *(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 488LL))(a1) + 56);
if ( *(_DWORD *)result )
{
v4 = *(_QWORD **)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 488LL))(a1) + 56) + 16LL);
v5 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 488LL))(a1) + 56) + 16LL);
result = **(unsigned int **)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 488LL))(a1) + 56);
for ( i = v5 + 8 * result - 8; (unsigned __int64)v4 <= i; ++v4 )
{
if ( !*v4 )
break;
result = (*(__int64 (__fastcall **)(_QWORD, __int16 *))(*(_QWORD *)*v4 + 960LL))(*v4, &v7);
}
}
}
return result;
}