//
// cocos2d::CCProgressTimer::draw from 0xaf7fa8 to 0xaf8164 (444 bytes)
//
// 2 xrefs:
// > ??> @ 0x3ee80
// > ??> @ 0x1211748
//
// 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 cocos2d::CCProgressTimer::draw(cocos2d::CCProgressTimer *a1)
{
cocos2d::CCGLProgram *v2; // x0
cocos2d::CCGLProgram *v3; // x0
unsigned int v4; // w20
unsigned int v5; // x0^4
cocos2d::CCTexture2D *v6; // x0
unsigned int v7; // w0
cocos2d::CCProgressTimerType m_eType; // w0
int v9; // w1
if ( a1->m_pVertexData && a1->m_pSprite )
{
cocos2d::ccGLEnable(a1->m_eGLServerState);
a1->getShaderProgram(a1);
v2 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::use(v2);
v3 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
v4 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_pSprite->getBlendFunc)(a1->m_pSprite);
v5 = (unsigned __int64)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_pSprite->getBlendFunc)(a1->m_pSprite) >> 32;
cocos2d::ccGLBlendFunc(v4, v5);
cocos2d::ccGLEnableVertexAttribs((unsigned int)&byte_7);
v6 = a1->m_pSprite->getTexture(a1->m_pSprite);
v7 = v6->getName(v6);
cocos2d::ccGLBindTexture2D(v7);
glVertexAttribPointer();
glVertexAttribPointer();
glVertexAttribPointer();
m_eType = a1->m_eType;
if ( m_eType )
{
if ( m_eType != kCCProgressTimerTypeBar )
{
LABEL_5:
v9 = g_uNumberOfDraws;
LABEL_6:
g_uNumberOfDraws = v9 + 1;
return;
}
if ( a1->m_bReverseDirection )
{
glDrawArrays();
glDrawArrays();
v9 = g_uNumberOfDraws + 1;
goto LABEL_6;
}
}
glDrawArrays();
goto LABEL_5;
}
}