//
// cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos from 0xa9d920 to 0xa9dad8 (440 bytes)
//
// 2 xrefs:
// > ??> @ 0x91d40
// > ??> @ 0x11f67b0
//
// 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 cocos2d::extension::CCControlSaturationBrightnessPicker::initWithTargetAndPos(
cocos2d::extension::CCControlSaturationBrightnessPicker *a1,
cocos2d::CCNode *a2,
cocos2d::CCPoint a3)
{
const cocos2d::CCPoint *v3; // x2
const cocos2d::CCPoint *v6; // x24
bool v7; // w23
float v8; // s0
float v9; // s1
cocos2d::CCSprite *m_background; // x1
cocos2d::CCPoint v12; // [xsp+58h] [xbp+58h] BYREF
cocos2d::CCPoint v13; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint v14; // 0:s0.4,4:s1.4
cocos2d::CCPoint v15; // 0:s0.4,4:s1.4
cocos2d::CCPoint v16; // 0:s0.4,4:s1.4
cocos2d::CCPoint v17; // 0:s0.4,4:s1.4
cocos2d::CCPoint v18; // 0:s2.4,4:s3.4
cocos2d::CCPoint v19; // 0:s2.4,4:s3.4
cocos2d::CCPoint v20; // 0:s2.4,4:s3.4
cocos2d::CCPoint v21; // 0:s2.4,4:s3.4
v6 = v3;
v7 = cocos2d::extension::CCControl::init(a1);
if ( v7 )
{
a1->setTouchEnabled(a1, 1);
cocos2d::CCPoint::CCPoint(&v12, v6);
cocos2d::CCPoint::CCPoint(&v13, 0.0, 0.0);
a1->m_background = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPickerBackground.png",
a2,
v14,
v18);
cocos2d::CCPoint::CCPoint(&v12, v6);
cocos2d::CCPoint::CCPoint(&v13, 0.0, 0.0);
a1->m_overlay = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPickerOverlay.png",
a2,
v15,
v19);
cocos2d::CCPoint::CCPoint(&v12, v6);
cocos2d::CCPoint::CCPoint(&v13, 0.0, 0.0);
a1->m_shadow = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPickerShadow.png",
a2,
v16,
v20);
cocos2d::CCPoint::CCPoint(&v12, v6);
cocos2d::CCPoint::CCPoint(&v13, 0.5, 0.5);
a1->m_slider = cocos2d::extension::CCControlUtils::addSpriteToTargetWithPosAndAnchor(
"colourPicker.png",
a2,
v17,
v21);
cocos2d::CCPoint::operator=(&a1->m_startPos, v8, v9);
m_background = a1->m_background;
a1->boxPos = 35;
a1->boxSize = (int)(float)(m_background->getContentSize(m_background)->width * 0.5);
}
return v7;
}