//
// CCCounterLabel::updateCounter from 0x2e591c to 0x2e5994 (120 bytes)
//
// 0 xrefs:
//
// 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; // r3
int m_targetCount; // r2
int v4; // r2
float m_stepSize; // s14
int v6; // r2
if ( a1->m_counterEnabled )
{
m_currentCount = a1->m_currentCount;
m_targetCount = a1->m_targetCount;
if ( m_currentCount < m_targetCount )
{
v4 = m_targetCount - m_currentCount;
m_stepSize = (float)a1->m_stepSize;
if ( (float)v4 <= m_stepSize )
m_stepSize = (float)v4;
LABEL_9:
a1->m_currentCount = (int)(float)((float)m_currentCount + m_stepSize);
CCCounterLabel::updateString(a1);
return;
}
if ( m_currentCount > m_targetCount )
{
v6 = m_targetCount - m_currentCount;
m_stepSize = (float)a1->m_stepSize;
if ( (float)v6 >= m_stepSize )
m_stepSize = (float)v6;
goto LABEL_9;
}
CCCounterLabel::disableCounter(a1);
}
}