//
// cocos2d::extension::CCControlColourPicker::init from 0x100243360 to 0x1002435f4 (660 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCControlColourPicker::colourPicker @ 0x100243850
// > ??> @ 0x100906630
//
// 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 11:01:25 +0000
//
bool __fastcall cocos2d::extension::CCControlColourPicker::init(_QWORD *a1)
{
_BOOL8 v2; // x19
__int64 v3; // x21
__int64 v4; // x0
float32x2_t *v5; // x22
float v6; // s8
__int64 v7; // x0
double v8; // d0
__int64 v9; // x22
float32x2_t *v10; // x23
double v11; // d0
__int64 v12; // x0
float v14; // [xsp+0h] [xbp-60h] BYREF
float32x2_t v15; // [xsp+8h] [xbp-58h] BYREF
float32x2_t v16; // [xsp+10h] [xbp-50h] BYREF
float32x2_t v17; // [xsp+18h] [xbp-48h] BYREF
v2 = cocos2d::extension::CCControl::init((__int64)a1);
if ( v2 )
{
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1000LL))(a1, 1);
v3 = cocos2d::CCSpriteBatchNode::create("CCControlColourPickerSpriteSheet.png", 29);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v3);
a1[60] = 0;
a1[61] = 0;
a1[62] = 0;
sub_1000262F4(&v17, &dbl_1009F4FB0);
sub_1000262BC((float *)&v16, 0.5, 0.5);
v4 = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"menuColourPanelBackground.png",
v3,
&v17,
&v16);
a1[65] = v4;
cocos2d::CCSprite::setFlipX(v4, 1);
v5 = (float32x2_t *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[65] + 192LL))(a1[65]);
v6 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[65] + 328LL))(a1[65]) * 0.5;
v7 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[65] + 328LL))(a1[65]);
sub_1000262BC((float *)&v16, v6, *(float *)(v7 + 4) * 0.5);
*(float32x2_t *)&v8 = sub_10002632C(v5, &v16, &v17);
v9 = a1[65];
v10 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v9 + 192LL))(v9, v8);
sub_1000262BC((float *)&v15, -1.75, 0.0);
*(float32x2_t *)&v11 = sub_100026318(v10, &v15, &v16);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v9 + 184LL))(v9, &v16, v11);
sub_1000262BC((float *)&v16, 14.0, 8.0);
sub_1000262BC((float *)&v15, 33.0, 28.0);
sub_1000262BC(&v14, v17.f32[0] + v16.f32[0], v17.f32[1] + v16.f32[1]);
a1[64] = cocos2d::extension::CCControlHuePicker::create(v3, &v14);
sub_1000262BC(&v14, v17.f32[0] + v15.f32[0], v17.f32[1] + v15.f32[1]);
a1[63] = cocos2d::extension::CCControlSaturationBrightnessPicker::create(v3, &v14);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64 (__fastcall *)(), _QWORD, __int64))(*(_QWORD *)a1[64] + 1328LL))(
a1[64],
a1,
cocos2d::extension::CCControlColourPicker::hueSliderValueChanged,
0,
256);
(*(void (__fastcall **)(_QWORD, _QWORD *, __int64 (__fastcall *)(), _QWORD, __int64))(*(_QWORD *)a1[63] + 1328LL))(
a1[63],
a1,
cocos2d::extension::CCControlColourPicker::colourSliderValueChanged,
0,
256);
cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker(a1);
(*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 456LL))(a1, a1[64]);
(*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 456LL))(a1, a1[63]);
v12 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[65] + 328LL))(a1[65]);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 320LL))(a1, v12);
}
return v2;
}