//
// GJMapPack::completedMaps from 0x1000afc08 to 0x1000afca4 (156 bytes)
//
// 5 xrefs:
// > GJMapPack::hasCompletedMapPack @ 0x1000afcc8
// > MapPackCell::loadFromMapPack @ 0x10010317c
// > MapPackCell::loadFromMapPack @ 0x1001033d4
// > MapPackCell::loadFromMapPack @ 0x100103428
// > GauntletNode::generateNode @ 0x1001c1c00
//
// 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 __fastcall GJMapPack::completedMaps(GJMapPack *a1)
{
cocos2d::CCArray *m_levels; // x0
__int64 v3; // x21
int v4; // w20
cocos2d::CCString *v5; // x0
int v6; // w22
_BOOL4 m_isGauntlet; // w23
GameStatsManager *v8; // x0
int hasCompletedGauntletLevel; // w0
m_levels = a1->m_levels;
if ( !m_levels || !(unsigned int)sub_10024A36C(m_levels) )
return 0;
v3 = 0;
v4 = 0;
do
{
v5 = (cocos2d::CCString *)sub_10024A388(a1->m_levels, v3);
v6 = cocos2d::CCString::intValue(v5);
m_isGauntlet = a1->m_isGauntlet;
v8 = GameStatsManager::sharedState();
if ( m_isGauntlet )
hasCompletedGauntletLevel = GameStatsManager::hasCompletedGauntletLevel(v8, v6);
else
hasCompletedGauntletLevel = GameStatsManager::hasCompletedOnlineLevel(v8, v6);
v4 += hasCompletedGauntletLevel;
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(a1->m_levels) );
return v4;
}