//
// cocos2d::CCLayerGradient::create from 0x180051700 to 0x18005179e (158 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bc0dc
//
// 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 11:21:45 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCLayerGradient *__fastcall cocos2d::CCLayerGradient::create(
const struct cocos2d::_ccColor4B *a1,
const struct cocos2d::_ccColor4B *a2)
{
cocos2d::CCLayerGradient *v4; // rax
cocos2d::CCLayerGradient *v5; // rbx
cocos2d::CCObject *v6; // rbx
v4 = (cocos2d::CCLayerGradient *)sub_1800E4AC0(0x238u);
v5 = v4;
if ( v4 )
{
memset(v4, 0, 0x238u);
v6 = cocos2d::CCLayerGradient::CCLayerGradient(v5);
}
else
{
v6 = nullptr;
}
if ( v6 )
{
if ( (*(unsigned __int8 (__fastcall **)(cocos2d::CCObject *, const struct cocos2d::_ccColor4B *, const struct cocos2d::_ccColor4B *))(*(_QWORD *)v6 + 1064LL))(
v6,
a1,
a2) )
{
cocos2d::CCObject::autorelease(v6);
return v6;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 8LL))(v6, 1);
}
return nullptr;
}