//
// SliderThumb::setValue from 0x2f5460 to 0x2f552c (204 bytes)
//
// 3 xrefs:
// > SliderThumb::setRotated @ 0x2f5568
// > SliderThumb::setMaxOffset @ 0x2f55bc
// > Slider::setValue @ 0x2f5bf0
//
// 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 SliderThumb::setValue(SliderThumb *a1, float a2)
{
SliderThumb_vtbl *v4; // r3
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
float *v6; // r0
float m_length; // s17
float v8; // r8
float v9; // s16
float v10; // s17
float v11; // r0
float v12; // r1
float y; // r2
float v14; // s17
float v15; // s16
float v16; // s17
float v17; // s15
const cocos2d::CCPoint *v18; // r3
cocos2d::CCPoint v19; // [sp+4h] [bp-Ch] BYREF
v4 = a1->cocos2d::CCMenuItemImage::cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
setPosition = a1->setPosition;
if ( a1->m_vertical )
{
v6 = (float *)((int (*)(void))v4->getPosition)();
m_length = a1->m_length;
v8 = *v6;
v9 = a2 * (float)(m_length * COERCE_FLOAT(((int (__fastcall *)(SliderThumb *))a1->getScale)(a1)));
v10 = a1->m_length;
v11 = COERCE_FLOAT(((int (__fastcall *)(SliderThumb *))a1->getScale)(a1));
v12 = v8;
y = v9 - (float)((float)(v10 * v11) * 0.5);
}
else
{
v14 = a1->m_length;
v15 = a2 * (float)(v14 * COERCE_FLOAT(((int (*)(void))v4->getScale)()));
v16 = a1->m_length;
v17 = COERCE_FLOAT(((int (__fastcall *)(SliderThumb *))a1->getScale)(a1));
v18 = a1->getPosition(a1);
v12 = v15 - (float)((float)(v16 * v17) * 0.5);
y = v18->y;
}
cocos2d::CCPoint::CCPoint(&v19, v12, y);
setPosition(a1, &v19);
}