//
// CCCounterLabel::updateCounter from 0x140043230 to 0x1400432af (127 bytes)
//
// 1 xrefs:
// > CCCounterLabel::setTargetCount @ 0x140043212
//
// 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 CCCounterLabel::updateCounter(CCCounterLabel *a1, float a2)
{
int m_currentCount; // edx
int m_targetCount; // eax
float v4; // xmm2_4
bool v5; // zf
if ( a1->m_counterEnabled )
{
m_currentCount = a1->m_currentCount;
m_targetCount = a1->m_targetCount;
if ( m_currentCount < m_targetCount )
{
v4 = fminf((float)(m_targetCount - m_currentCount), (float)a1->m_stepSize);
LABEL_6:
a1->m_currentCount = (int)(float)(v4 + (float)m_currentCount);
CCCounterLabel::updateString(a1);
return;
}
if ( m_currentCount > m_targetCount )
{
v4 = fmaxf((float)(m_targetCount - m_currentCount), (float)a1->m_stepSize);
goto LABEL_6;
}
v5 = !a1->m_dontSchedule;
a1->m_counterEnabled = 0;
if ( v5 )
cocos2d::CCNode::unscheduleAllSelectors(a1);
}
}