//
// cocos2d::CCLayerGradient::initWithColor from 0x1004b3bf0 to 0x1004b3c97 (167 bytes)
//
// 2 xrefs:
// > ??> @ 0x1008c25f0
// > ??> @ 0x10094aa10
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall cocos2d::CCLayerGradient::initWithColor(
cocos2d::CCLayerGradient *a1,
const cocos2d::ccColor4B *a2,
const cocos2d::ccColor4B *a3,
const cocos2d::CCPoint *a4)
{
float v5[2]; // [rsp+4h] [rbp-1Ch] BYREF
unsigned int v6[5]; // [rsp+Ch] [rbp-14h] BYREF
a1->m_endColor.r = a3->r;
a1->m_endColor.g = a3->g;
a1->m_endColor.b = a3->b;
a1->m_cEndOpacity = a3->a;
a1->m_cStartOpacity = a2->a;
sub_10028CC90(&a1->m_AlongVector, (double *)a4);
*(_WORD *)&a1->m_bCompressedInterpolation = 1;
v6[0] = a2->r | (*(unsigned __int16 *)&a2->g << 8) | 0xFF000000;
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v5);
((void (__fastcall *)(cocos2d::CCLayerGradient *, unsigned int *, float, float))a1->initWithColor)(
a1,
v6,
v5[0],
v5[1]);
return 1;
}