//
// GJChallengeItem::incrementCount from 0x100333e5c to 0x100333ecc (112 bytes)
//
// 1 xrefs:
// > GameStatsManager::incrementChallenge @ 0x10032fa04
//
// 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 GJChallengeItem::incrementCount(GJChallengeItem *a1, int a2)
{
int v3; // w20
int v4; // w8
int v5; // w8
if ( !a1->m_canClaim )
{
v3 = a1->m_count.random - a1->m_count.seed + a2;
v4 = a1->m_goal.random - a1->m_goal.seed;
if ( v3 >= v4 )
{
a1->m_canClaim = 1;
v3 = v4;
}
a1->m_count.value = v3;
v5 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0);
a1->m_count.random = v3 + v5;
a1->m_count.seed = v5;
}
}