//
// cocos2d::extension::CCControlHuePicker::setHuePercentage from 0xd0ea80 to 0xd0eb78 (248 bytes)
//
// 2 xrefs:
// > ??> @ 0x6ed58
// > ??> @ 0x150b8a8
//
// 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:01 +0000
//
__int64 __fastcall cocos2d::extension::CCControlHuePicker::setHuePercentage(
cocos2d::extension::CCControlHuePicker *this,
float a2)
{
cocos2d::CCNode *v3; // x0
float v4; // s9
float v5; // s10
float v6; // s8
float v7; // s12
float v8; // s0
__int64 v9; // x22
float v10; // s2
float v11; // s1
void (__fastcall *v12)(__int64, _BYTE *); // x19
_BYTE v14[8]; // [xsp+70h] [xbp+70h] BYREF
__int64 v15; // [xsp+78h] [xbp+78h] BYREF
float v16; // [xsp+80h] [xbp+80h]
float v17; // [xsp+84h] [xbp+84h]
v3 = *((cocos2d::CCNode **)this + 60);
*((float *)this + 119) = a2;
*((float *)this + 118) = a2 * 360.0;
cocos2d::CCNode::boundingBox(&v15, v3);
v4 = v16;
v5 = (float)(v16 * 0.5) + -15.0;
v6 = (float)((float)(*((float *)this + 119) * 360.0) + -180.0) * 0.017453;
v7 = cosf(v6);
v8 = sinf(v6);
v9 = *((_QWORD *)this + 61);
v10 = *((float *)this + 124);
v11 = *((float *)this + 125);
v12 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v14,
(float)(v10 + (float)(v4 * 0.5)) + (float)(v5 * v7),
(float)(v11 + (float)(v17 * 0.5)) + (float)(v5 * v8));
v12(v9, v14);
return _stack_chk_guard;
}