//
// GameLevelManager::getSavedDailyLevelFromLevelID from 0x100537720 to 0x10053776a (74 bytes)
//
// 2 xrefs:
// > CommentCell::loadFromComment @ 0x1002486d1
// > CommentCell::loadFromComment @ 0x100248901
//
// 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
//
GJGameLevel *__fastcall GameLevelManager::getSavedDailyLevelFromLevelID(GameLevelManager *a1, int a2)
{
cocos2d::CCDictionary *m_dailyLevels; // rax
cocos2d::CCDictElement *m_pElements; // rcx
GJGameLevel *result; // rax
m_dailyLevels = a1->m_dailyLevels;
if ( !m_dailyLevels )
return nullptr;
m_pElements = m_dailyLevels->m_pElements;
if ( !m_pElements )
return nullptr;
while ( 1 )
{
result = (GJGameLevel *)m_pElements->m_pObject;
if ( result->m_levelID.random - result->m_levelID.seed == a2 )
break;
m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;
if ( !m_pElements )
return nullptr;
}
return result;
}