//
// CCPartAnimSprite::setColor from 0x692a08 to 0x692aec (228 bytes)
//
// 4 xrefs:
// > CCAnimatedSprite::switchToMode @ 0x68c81c
// > CCAnimatedSprite::setColor @ 0x68d754
// > GJRobotSprite::updateColors @ 0xa3c6dc
// > ??> @ 0x99ee0
//
// This function is hookable on this platform (idp: arm, 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:50:36 +0000
//
__int64 __fastcall CCPartAnimSprite::setColor(__int64 *a1, __int64 a2)
{
__int64 result; // x0
__int64 *v4; // x19
__int64 v5; // x2
__int64 v6; // x1
__int64 *v7; // x0
__int64 v8; // x20
unsigned __int64 i; // x20
__int64 v10; // [xsp+38h] [xbp+38h] BYREF
v10 = a2;
cocos2d::CCSprite::setColor(a1, &v10);
result = (*(__int64 (__fastcall **)(__int64 *))(*a1 + 488))(a1);
if ( result )
{
result = **(unsigned int **)((*(__int64 (__fastcall **)(__int64 *))(*a1 + 488))(a1) + 56);
if ( (_DWORD)result )
{
v4 = *(__int64 **)(*(_QWORD *)((*(__int64 (__fastcall **)(__int64 *))(*a1 + 488))(a1) + 56) + 16LL);
v5 = *(_QWORD *)((*(__int64 (__fastcall **)(__int64 *))(*a1 + 488))(a1) + 56);
v6 = *a1;
v7 = a1;
v8 = *(_QWORD *)(v5 + 16);
result = *(_QWORD *)((*(__int64 (__fastcall **)(__int64 *))(v6 + 488))(v7) + 56);
for ( i = v8 + 8LL * *(unsigned int *)result - 8;
i >= (unsigned __int64)v4;
result = (*(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)result + 960LL))(result, &v10) )
{
result = *v4;
if ( !*v4 )
break;
++v4;
}
}
}
return result;
}