//
// CCCounterLabel::updateCounter from 0x1005117e0 to 0x100511854 (116 bytes)
//
// 2 xrefs:
// > CCCounterLabel::enableCounter @ 0x1005117bf
// > CCCounterLabel::setTargetCount @ 0x1005118f8
//
// 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 __fastcall CCCounterLabel::updateCounter(CCCounterLabel *a1, float a2)
{
int m_targetCount; // ecx
int m_currentCount; // eax
bool v4; // zf
bool v5; // sf
bool v6; // of
int v7; // ecx
float v8; // xmm0_4
if ( a1->m_counterEnabled )
{
m_targetCount = a1->m_targetCount;
m_currentCount = a1->m_currentCount;
v6 = __OFSUB__(m_targetCount, m_currentCount);
v4 = m_targetCount == m_currentCount;
v5 = m_targetCount - m_currentCount < 0;
v7 = m_targetCount - m_currentCount;
if ( !(v5 ^ v6 | v4) )
{
v8 = fminf((float)a1->m_stepSize, (float)v7);
LABEL_6:
a1->m_currentCount = (int)(float)((float)m_currentCount + v8);
CCCounterLabel::updateString(a1);
return;
}
if ( v5 != v6 )
{
v8 = fmaxf((float)a1->m_stepSize, (float)v7);
goto LABEL_6;
}
a1->m_counterEnabled = 0;
if ( !a1->m_dontSchedule )
cocos2d::CCNode::unscheduleAllSelectors(a1);
}
}