//
// cocos2d::CCProgressTimer::initWithSprite from 0xaf9130 to 0xaf9230 (256 bytes)
//
// 2 xrefs:
// > cocos2d::CCProgressTimer::create @ 0xaf9258
// > ??> @ 0xc6138
//
// 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::CCProgressTimer::initWithSprite(cocos2d::CCProgressTimer *a1, cocos2d::CCSprite *a2)
{
cocos2d::CCProgressTimer_vtbl *v4; // x1
void (__fastcall *setMidpoint)(cocos2d::CCProgressTimer *__hidden, cocos2d::CCPoint); // x23
float v6; // s0
float v7; // s1
void (__fastcall *setShaderProgram)(cocos2d::CCNode *__hidden, cocos2d::CCGLProgram *); // x20
cocos2d::CCShaderCache *v9; // x0
cocos2d::CCGLProgram *v10; // x0
cocos2d::CCPoint v12; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCPoint v13; // 0:s0.4,4:s1.4
cocos2d::CCProgressTimer::setPercentage(a1, 0.0);
a1->m_pVertexData = nullptr;
a1->m_nVertexDataCount = 0;
cocos2d::CCPoint::CCPoint(&v12, 0.5, 0.5);
cocos2d::CCProgressTimer::setAnchorPoint(a1, v13);
a1->m_eType = kCCProgressTimerTypeRadial;
v4 = a1->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_bReverseDirection = 0;
setMidpoint = v4->setMidpoint;
cocos2d::CCPoint::CCPoint(&v12, 0.5, 0.5);
((void (__fastcall *)(cocos2d::CCProgressTimer *, cocos2d::CCPoint *))setMidpoint)(a1, &v12);
cocos2d::CCPoint::CCPoint(&v12, 1.0, 1.0);
cocos2d::CCPoint::operator=(&a1->m_tBarChangeRate, v6, v7, (float *)&v12);
cocos2d::CCProgressTimer::setSprite(a1, a2);
setShaderProgram = a1->setShaderProgram;
v9 = cocos2d::CCShaderCache::sharedShaderCache();
v10 = cocos2d::CCShaderCache::programForKey(v9, "ShaderPositionTextureColor");
setShaderProgram(a1, v10);
return 1;
}