//
// cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite from 0x10035ab10 to 0x10035ac75 (357 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCControlPotentiometer::create @ 0x10035aab7
//
// 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 __fastcall cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite(
cocos2d::extension::CCControlPotentiometer *a1,
cocos2d::CCSprite *a2,
cocos2d::CCProgressTimer *a3,
cocos2d::CCSprite *a4)
{
bool result; // al
bool v8; // r13
cocos2d::CCProgressTimer *v9; // rdi
cocos2d::CCSprite *v10; // rdi
__int64 v11; // rax
__int64 v12; // rax
result = cocos2d::extension::CCControl::init(a1);
if ( result )
{
v8 = result;
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, __int64))a1->setTouchEnabled)(a1, 1);
v9 = *(cocos2d::CCProgressTimer **)&a1[1].m_uID;
if ( v9 != a3 )
{
if ( a3 )
{
cocos2d::CCObject::retain(a3);
v9 = *(cocos2d::CCProgressTimer **)&a1[1].m_uID;
}
if ( v9 )
cocos2d::CCObject::release(v9);
*(_QWORD *)&a1[1].m_uID = a3;
}
v10 = (cocos2d::CCSprite *)a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( v10 != a4 )
{
if ( a4 )
{
cocos2d::CCObject::retain(a4);
v10 = (cocos2d::CCSprite *)a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
}
if ( v10 )
cocos2d::CCObject::release(v10);
a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::extension::CCControlPotentiometer_vtbl *)a4;
}
v11 = ((__int64 (__fastcall *)(cocos2d::CCProgressTimer *))a3->getPosition)(a3);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a4->setPosition)(a4, v11);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(
a1,
a4,
2);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, cocos2d::CCProgressTimer *, __int64))a1->addChild_0)(
a1,
a3,
1);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, cocos2d::CCSprite *))a1->addChild)(a1, a2);
v12 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a2->getContentSize)(a2);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, __int64))a1->setContentSize)(a1, v12);
a1[1].m_uIndexInArray = 1065353216;
*(_QWORD *)&a1[1].m_uAutoReleaseCount = 0;
cocos2d::CCProgressTimer::setPercentage(*(cocos2d::CCProgressTimer **)&a1[1].m_uID, 0.0);
(*((void (__fastcall **)(cocos2d::extension::CCControlPotentiometer_vtbl *, double))a1[1].copyWithZone + 43))(
a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable,
0.0);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, __int64))a1->sendActionsForControlEvents)(
a1,
256);
return v8;
}
return result;
}