//
// GameStatsManager::getCollectedCoinsForLevel from 0x7a2c54 to 0x7a2cb8 (100 bytes)
//
// 8 xrefs:
// > GameStatsManager::checkCoinAchievement @ 0x7a2d14
// > GameStatsManager::checkCoinAchievement @ 0x7a2d68
// > GameStatsManager::checkCoinAchievement @ 0x7a2db8
// > GameStatsManager::checkCoinAchievement @ 0x7a2df8
// > GameStatsManager::checkCoinAchievement @ 0x7a2e14
// > GameStatsManager::checkCoinAchievement @ 0x7a2e30
// > GameStatsManager::checkCoinAchievement @ 0x7a2e70
// > ??> @ 0x88f98
//
// 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
//
int GameStatsManager::getCollectedCoinsForLevel(GameStatsManager *a1, GJGameLevel *a2)
{
int v2; // w19
int v5; // w20
int v6; // w1
const char *CoinKey; // x0
v2 = 1;
v5 = 0;
do
{
v6 = v2++;
CoinKey = GJGameLevel::getCoinKey(a2, v6);
if ( GameStatsManager::hasSecretCoin(a1, CoinKey) )
++v5;
}
while ( v2 != 4 );
return v5;
}