//
// cocos2d::CCSprite::updateColor from 0xd873dc to 0xd874bc (224 bytes)
//
// 7 xrefs:
// > CCSpriteWithHue::updateColor @ 0x6de034
// > cocos2d::CCSprite::setOpacityModifyRGB @ 0xd874d4
// > cocos2d::CCSprite::setOpacity @ 0xd88374
// > cocos2d::CCSprite::setColor @ 0xd883c0
// > cocos2d::CCSprite::updateDisplayedColor @ 0xd88418
// > cocos2d::CCSprite::updateDisplayedOpacity @ 0xd88444
// > ??> @ 0x618d0
//
// 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 13:08:13 +0000
//
__int64 __fastcall cocos2d::CCSprite::updateColor(cocos2d::CCSprite *this)
{
int v2; // w5
int v3; // w2
int v4; // w3
__int64 result; // x0
int v6; // w4
float v7; // s3
__int64 v8; // x5
v2 = *((unsigned __int8 *)this + 556);
v3 = *((unsigned __int8 *)this + 330);
v4 = *((unsigned __int8 *)this + 332);
result = *((unsigned __int8 *)this + 331);
v6 = *((unsigned __int8 *)this + 328);
if ( v2 )
{
v7 = (float)v6 / 255.0;
LOBYTE(v3) = (unsigned int)(float)((float)v3 * v7);
result = (unsigned __int8)(unsigned int)(float)(v7 * (float)(int)result);
LOBYTE(v4) = (unsigned int)(float)(v7 * (float)v4);
}
v8 = *((_QWORD *)this + 46);
*((_BYTE *)this + 496) = v3;
*((_BYTE *)this + 497) = result;
*((_BYTE *)this + 498) = v4;
*((_BYTE *)this + 499) = v6;
*((_BYTE *)this + 544) = v3;
*((_BYTE *)this + 545) = result;
*((_BYTE *)this + 546) = v4;
*((_BYTE *)this + 547) = v6;
*((_BYTE *)this + 472) = v3;
*((_BYTE *)this + 473) = result;
*((_BYTE *)this + 474) = v4;
*((_BYTE *)this + 475) = v6;
*((_BYTE *)this + 520) = v3;
*((_BYTE *)this + 521) = result;
*((_BYTE *)this + 522) = v4;
*((_BYTE *)this + 523) = v6;
if ( v8 )
{
if ( *((_DWORD *)this + 90) == -1 )
return (*(__int64 (__fastcall **)(cocos2d::CCSprite *, __int64))(*(_QWORD *)this + 1200LL))(this, 1);
else
return cocos2d::CCTextureAtlas::updateQuad(*((_QWORD *)this + 44), (char *)this + 460);
}
return result;
}