2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 00:27:42 +00:00

Work on CStateManager::InitializeState flow

This commit is contained in:
Jack Andersen
2016-08-13 17:00:58 -10:00
parent abcb9c2424
commit 2a425b5a73
20 changed files with 403 additions and 80 deletions

View File

@@ -33,4 +33,21 @@ void CGameState::SetTotalPlayTime(float time)
xa0_playTime = zeus::clamp<double>(0.0, time, 359999.0);
}
CWorldState& CGameState::StateForWorld(ResId mlvlId)
{
auto it = x88_worldStates.begin();
for (; it != x88_worldStates.end() ; ++it)
{
if (it->GetWorldAssetId() == mlvlId)
break;
}
if (it == x88_worldStates.end())
{
x88_worldStates.emplace_back(mlvlId);
return x88_worldStates.back();
}
return *it;
}
}