MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / loadIndex

Function loadIndex

src/OpenLoco/src/Scenario/ScenarioManager.cpp:390–404  ·  view source on GitHub ↗

0x0044452F

Source from the content-addressed store, hash-verified

388
389 // 0x0044452F
390 void loadIndex(const bool forceReload)
391 {
392 const auto oldFlags = SceneManager::getSceneFlags();
393 SceneManager::setSceneFlags(SceneManager::Flags::title | oldFlags);
394
395 const auto currentState = getCurrentScenarioFolderState();
396 // We should always try and load as we want to keep scores
397 // when adding/removing scenarios
398 if (!tryLoadIndex(currentState) || forceReload)
399 {
400 createIndex(currentState);
401 }
402
403 setSceneFlags(oldFlags);
404 }
405
406 // 0x00438959
407 void saveNewScore(Scenario::ObjectiveProgress& progress, const CompanyId companyId)

Callers 1

importSaveToGameStateFunction · 0.50

Calls 5

getSceneFlagsFunction · 0.85
setSceneFlagsFunction · 0.85
tryLoadIndexFunction · 0.70
createIndexFunction · 0.70

Tested by

no test coverage detected