//
// cocos2d::extension::CCControlColourPicker::colourSliderValueChanged from 0x100355b30 to 0x100355c0c (220 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCControlColourPicker::init @ 0x100355921
//
// 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
//
void __fastcall cocos2d::extension::CCControlColourPicker::colourSliderValueChanged(
cocos2d::extension::CCControlColourPicker *a1,
cocos2d::CCObject *a2,
unsigned int a3)
{
__int64 v3; // rcx
__int64 v4; // r8
int v6; // eax
int v7; // ecx
int v8; // edx
__int64 v9; // rdx
__int64 v10; // rcx
__int64 v11; // r8
__int64 v12; // r9
cocos2d::CCSprite *m_colorTarget; // rdi
cocos2d::extension::ColorPickerDelegate *m_delegate; // rdi
double v15[6]; // [rsp+20h] [rbp-30h] BYREF
cocos2d::HSV m_hsv; // 0:^0.24
*(__m128d *)&a1->m_hsv.s = _mm_cvtps_pd(*(__m64 *)&a2[8].m_uAutoReleaseCount);
m_hsv = a1->m_hsv;
cocos2d::extension::CCControlUtils::RGBfromHSV((unsigned int)v15, (_DWORD)a2, a3, v3, v4);
v6 = (int)(v15[0] * 255.0);
v7 = (int)(v15[1] * 255.0);
v8 = (int)(255.0 * v15[2]);
a1->m_rgb.b = v8;
v9 = (unsigned int)(v8 << 16);
v10 = (unsigned int)v9 | ((unsigned __int8)v7 << 8);
*(_WORD *)&a1->m_rgb.r = v10 | (unsigned __int8)v6;
((void (__fastcall *)(cocos2d::extension::CCControlColourPicker *, __int64, __int64, __int64, __int64, __int64, _QWORD, _QWORD, _QWORD))a1->sendActionsForControlEvents)(
a1,
256,
v9,
v10,
v11,
v12,
*(_QWORD *)&m_hsv.h,
*(_QWORD *)&m_hsv.s,
*(_QWORD *)&m_hsv.v);
m_colorTarget = a1->m_colorTarget;
if ( m_colorTarget )
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))m_colorTarget->setColor)(m_colorTarget, &a1->m_rgb);
m_delegate = a1->m_delegate;
if ( m_delegate )
((void (__fastcall *)(cocos2d::extension::ColorPickerDelegate *, _QWORD))m_delegate->colorValueChanged)(
m_delegate,
*(unsigned __int16 *)&a1->m_rgb.r | (a1->m_rgb.b << 16));
}