//
// cocos2d::CCLayerGradient::updateColor from 0x7d7124 to 0x7d71bc (152 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:40 +0000
//
float __fastcall cocos2d::CCLayerGradient::updateColor(cocos2d::CCLayerGradient *this, const cocos2d::CCPoint *a2)
{
float result; // r0
float v4[2]; // [sp+4h] [bp-18h] BYREF
float v5[2]; // [sp+Ch] [bp-10h] BYREF
result = COERCE_FLOAT(cocos2d::ccpLength((cocos2d::CCLayerGradient *)((char *)this + 448), a2));
if ( result != 0.0 )
{
cocos2d::CCPoint::CCPoint(v4, *((float *)this + 112) / result, *((float *)this + 113) / result);
if ( *((_BYTE *)this + 456) )
{
cocos2d::CCPoint::operator*(v5, v4, (float)(1.0 / (float)(fabsf(v4[0]) + fabsf(v4[1]))) * 1.4142);
cocos2d::CCPoint::operator=(v4, v5);
}
JUMPOUT(0x7D71BC);
}
return result;
}