//
// GameLevelManager::getCompletedGauntletDemons from 0x705da4 to 0x705e7c (216 bytes)
//
// 2 xrefs:
// > GameLevelManager::updateUserScore @ 0x73762c
// > ??> @ 0x42258
//
// 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 GameLevelManager::getCompletedGauntletDemons(GameLevelManager *a1)
{
cocos2d::CCDictionary *m_gauntletLevels; // x0
cocos2d::CCDictElement *m_pElements; // x0
cocos2d::CCDictElement *next; // x19
int v4; // w23
cocos2d::CCObject *m_pObject; // x0
GJGameLevel *v6; // x0
GJGameLevel *v7; // x20
GameStatsManager *v8; // x0
m_gauntletLevels = a1->m_gauntletLevels;
if ( m_gauntletLevels )
{
m_pElements = m_gauntletLevels->m_pElements;
if ( m_pElements )
{
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
v4 = 0;
while ( 1 )
{
m_pObject = m_pElements->m_pObject;
if ( m_pObject
&& (v6 = (GJGameLevel *)_dynamic_cast(
m_pObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'GJGameLevel,
0),
(v7 = v6) != nullptr)
&& v6->m_stars.random - v6->m_stars.seed == 10
&& GJGameLevel::getNormalPercent(v6) == 100 )
{
v8 = GameStatsManager::sharedState();
if ( GameStatsManager::hasCompletedLevel(v8, v7) )
++v4;
if ( !next )
return v4;
}
else if ( !next )
{
return v4;
}
m_pElements = next;
next = (cocos2d::CCDictElement *)next->hh.next;
}
}
}
return 0;
}