//
// GJChallengeItem::incrementCount from 0x5167a4 to 0x5167ca (38 bytes)
//
// 1 xrefs:
// > GameStatsManager::incrementChallenge @ 0x519010
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:51:41 +0000
//
unsigned int __fastcall GJChallengeItem::incrementCount(unsigned int this, int a2)
{
int v2; // r1
if ( !*(_BYTE *)(this + 96) )
{
v2 = a2 + *(_DWORD *)(this + 56) - *(_DWORD *)(this + 60);
if ( v2 >= *(_DWORD *)(this + 80) - *(_DWORD *)(this + 84) )
{
v2 = *(_DWORD *)(this + 80) - *(_DWORD *)(this + 84);
*(_BYTE *)(this + 96) = 1;
}
return GJChallengeItem::setCount((GJChallengeItem *)this, v2);
}
return this;
}