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

Function loadIndex

src/OpenLoco/src/Objects/ObjectIndex.cpp:544–562  ·  view source on GitHub ↗

0x00470F3C

Source from the content-addressed store, hash-verified

542
543 // 0x00470F3C
544 void loadIndex()
545 {
546 // 0x00112A138 -> 144
547 const auto vanillaObjectPath = Environment::getPathNoWarning(Environment::PathId::vanillaObjects);
548 const auto vanillaState = getCurrentObjectFolderState(vanillaObjectPath, false);
549 const auto objectPath = Environment::getPathNoWarning(Environment::PathId::objects);
550 const auto objectState = getCurrentObjectFolderState(objectPath, true);
551 const auto customObjectPath = Environment::getPathNoWarning(Environment::PathId::customObjects);
552 const auto customState = getCurrentObjectFolderState(customObjectPath, true);
553
554 const auto currentState = ObjectFoldersState{ vanillaState, objectState, customState };
555
556 if (!tryLoadIndex(currentState))
557 {
558 createIndex(currentState);
559 }
560
561 _customObjectsInIndex = hasCustomObjectsInIndex();
562 }
563
564 bool getCustomObjectsInIndexStatus()
565 {

Callers 4

goToNextStepFunction · 0.50
quitGameFunction · 0.50
initialiseFunction · 0.50
languageDropdownFunction · 0.50

Calls 5

getPathNoWarningFunction · 0.85
hasCustomObjectsInIndexFunction · 0.85
tryLoadIndexFunction · 0.70
createIndexFunction · 0.70

Tested by

no test coverage detected