//
// CCCounterLabel::setTargetCount from 0x10003abe4 to 0x10003ac54 (112 bytes)
//
// 2 xrefs:
// > GJShopLayer::updateCurrencyCounter @ 0x10014c044
// > GJShopLayer::didPurchaseItem @ 0x10014c4d0
//
// 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::setTargetCount(CCCounterLabel *a1, int a2)
{
int m_stepCount; // w8
float m_currentCount; // s1
float v4; // s2
cocos2d::SEL_SCHEDULE v5; // 0:x1.16
m_stepCount = a1->m_stepCount;
m_currentCount = (float)a1->m_currentCount;
v4 = vabds_f32((float)a2, m_currentCount);
a1->m_targetCount = a2;
if ( v4 < (float)m_stepCount )
m_stepCount = (int)v4;
a1->m_stepSize = (int)(float)((float)((float)a2 - m_currentCount) / (float)m_stepCount);
if ( !a1->m_counterEnabled )
{
a1->m_counterEnabled = 1;
if ( !a1->m_dontSchedule )
{
v5.ptr = (void (__cdecl *)(float))CCCounterLabel::updateCounter;
v5.adj = 0;
cocos2d::CCNode::schedule(a1, v5, 0.033333);
}
}
}