//
// GJChallengeItem::incrementCount from 0x7adcf0 to 0x7add74 (132 bytes)
//
// 2 xrefs:
// > GameStatsManager::incrementChallenge @ 0x7ade38
// > ??> @ 0x72c78
//
// 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 GJChallengeItem::incrementCount(GJChallengeItem *a1, int a2)
{
int v2; // w20
int v4; // w0
if ( !a1->m_canClaim )
{
v2 = a2 + a1->m_count.random - a1->m_count.seed;
if ( v2 >= a1->m_goal.random - a1->m_goal.seed )
{
v2 = a1->m_goal.random - a1->m_goal.seed;
a1->m_canClaim = 1;
}
a1->m_count.value = v2;
v4 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
a1->m_count.seed = v4;
a1->m_count.random = v2 + v4;
}
}