//
// cocos2d::extension::CCControlPotentiometer::setValue from 0x7acb84 to 0x7acc06 (130 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite @ 0x7accd0
// > cocos2d::extension::CCControlPotentiometer::setMinimumValue @ 0x7acd68
// > cocos2d::extension::CCControlPotentiometer::setMaximumValue @ 0x7acd98
// > cocos2d::extension::CCControlPotentiometer::potentiometerMoved @ 0x7ad090
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:03 +0000
//
int __fastcall cocos2d::extension::CCControlPotentiometer::setValue(
cocos2d::extension::CCControlPotentiometer *this,
float a2)
{
float v2; // s15
float v4; // s13
float v5; // s14
float v6; // s16
v2 = a2;
v4 = *((float *)this + 94);
v5 = *((float *)this + 95);
if ( a2 < v4 )
v2 = *((float *)this + 94);
if ( v2 > v5 )
v2 = *((float *)this + 95);
*((float *)this + 93) = v2;
v6 = (float)(v2 - v4) / (float)(v5 - v4);
cocos2d::CCProgressTimer::setPercentage(*((cocos2d::CCProgressTimer **)this + 90), v6 * 100.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 89) + 180))(*((_DWORD *)this + 89), v6 * 360.0);
return (*(int (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, int))(*(_DWORD *)this + 660))(this, 256);
}