//
// cocos2d::CCSprite::updateColor from 0x100275980 to 0x100275a95 (277 bytes)
//
// 1 xrefs:
// > CCSpriteWithHue::updateColor @ 0x1006c34d9
//
// 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:27:39 +0000
//
__int64 __fastcall cocos2d::CCSprite::updateColor(unsigned __int8 *a1)
{
unsigned __int8 *v1; // rsi
__int64 result; // rax
int v3; // ecx
int v4; // edx
float v5; // xmm0_4
__int64 v6; // rdx
v1 = a1;
result = a1[328];
LOBYTE(v3) = a1[330];
LOBYTE(v4) = a1[331];
LOBYTE(a1) = a1[332];
if ( v1[556] == 1 )
{
v5 = (float)(unsigned __int8)result / 255.0;
v3 = (int)(float)((float)(unsigned __int8)v3 * v5);
v4 = (int)(float)((float)(unsigned __int8)v4 * v5);
LODWORD(a1) = (int)(float)((float)(unsigned __int8)a1 * v5);
}
v1[496] = v3;
v1[497] = v4;
v1[498] = (unsigned __int8)a1;
v1[499] = result;
v1[544] = v3;
v1[545] = v4;
v1[546] = (unsigned __int8)a1;
v1[547] = result;
v1[472] = v3;
v1[473] = v4;
v1[474] = (unsigned __int8)a1;
v1[475] = result;
v1[520] = v3;
v1[521] = v4;
v1[522] = (unsigned __int8)a1;
v1[523] = result;
if ( *((_QWORD *)v1 + 46) )
{
v6 = *((unsigned int *)v1 + 90);
if ( (_DWORD)v6 == -1 )
return (*(__int64 (__fastcall **)(unsigned __int8 *, __int64))(*(_QWORD *)v1 + 1200LL))(v1, 1);
else
return cocos2d::CCTextureAtlas::updateQuad(*((_QWORD *)v1 + 44), v1 + 460, v6);
}
return result;
}