//
// CCCounterLabel::updateCounter from 0x100512810 to 0x100512884 (116 bytes)
//
// 2 xrefs:
// > CCCounterLabel::enableCounter @ 0x1005127ef
// > CCCounterLabel::setTargetCount @ 0x100512928
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:31:37 +0000
//
void __fastcall CCCounterLabel::updateCounter(__int64 a1)
{
int v1; // ecx
int v2; // eax
bool v3; // cc
int v4; // ecx
float v5; // xmm0_4
if ( *(_BYTE *)(a1 + 528) == 1 )
{
v1 = *(_DWORD *)(a1 + 520);
v2 = *(_DWORD *)(a1 + 524);
v3 = v1 <= v2;
v4 = v1 - v2;
if ( v3 )
v5 = fmaxf((float)*(int *)(a1 + 516), (float)v4);
else
v5 = fminf((float)*(int *)(a1 + 516), (float)v4);
*(_DWORD *)(a1 + 524) = (int)(float)((float)v2 + v5);
CCCounterLabel::updateString(a1);
}
}