//
// cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos from 0xd0f358 to 0xd0f510 (440 bytes)
//
// 2 xrefs:
// > ??> @ 0xc0c70
// > ??> @ 0x150bfc0
//
// 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 13:07:02 +0000
//
__int64 __fastcall cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos(
__int64 a1,
__int64 a2,
const cocos2d::CCPoint *a3)
{
unsigned __int8 v6; // w0
unsigned int v7; // w23
long double v8; // q0
__int64 v9; // x1
_BYTE v11[8]; // [xsp+58h] [xbp+58h] BYREF
_BYTE v12[8]; // [xsp+60h] [xbp+60h] BYREF
v6 = cocos2d::extension::CCControl::init((cocos2d::extension::CCControl *)a1);
v7 = v6;
if ( v6 )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 0.0, 0.0);
*(_QWORD *)(a1 + 480) = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPickerBackground.png",
a2,
v11,
v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 0.0, 0.0);
*(_QWORD *)(a1 + 488) = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPickerOverlay.png",
a2,
v11,
v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 0.0, 0.0);
*(_QWORD *)(a1 + 496) = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPickerShadow.png",
a2,
v11,
v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, 0.5, 0.5);
*(_QWORD *)(a1 + 504) = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPicker.png",
a2,
v11,
v12);
*(__n128 *)&v8 = cocos2d::CCPoint::operator=(a1 + 512, a3);
v9 = *(_QWORD *)(a1 + 480);
*(_DWORD *)(a1 + 520) = 35;
*(_DWORD *)(a1 + 524) = (int)(float)(*(float *)(*(__int64 (__fastcall **)(__int64, long double))(*(_QWORD *)v9 + 328LL))(
v9,
v8)
* 0.5);
}
return v7;
}