//
// GameLevelManager::getSavedDailyLevelFromLevelID from 0x3bf984 to 0x3bf9c2 (62 bytes)
//
// 2 xrefs:
// > CommentCell::loadFromComment @ 0x33655e
// > CommentCell::loadFromComment @ 0x336694
//
// 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 *GameLevelManager::getSavedDailyLevelFromLevelID(GameLevelManager *a1, int a2)
{
GJGameLevel *result; // r0
GJGameLevel *seed; // r3
GJGameLevel *v4; // r2
result = (GJGameLevel *)a1->m_dailyLevels;
if ( result )
{
result = (GJGameLevel *)LODWORD(result->m_fRotationX);
if ( result )
seed = (GJGameLevel *)result->m_levelID.seed;
else
seed = nullptr;
while ( result )
{
result = *(GJGameLevel **)&result->m_bUseChildIndex;
if ( result->m_levelID.random - result->m_levelID.seed == a2 )
break;
if ( seed )
v4 = (GJGameLevel *)seed->m_levelID.seed;
else
v4 = nullptr;
result = seed;
seed = v4;
}
}
return result;
}