MCPcopy Create free account
hub / github.com/OpenMW/openmw / resolveParentFileIndices

Method resolveParentFileIndices

components/esm3/esmreader.cpp:67–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 void ESMReader::resolveParentFileIndices(ReadersCache& readers)
68 {
69 mCtx.parentFileIndices.clear();
70 for (const Header::MasterData& mast : getGameFiles())
71 {
72 const std::string& fname = mast.name;
73 int index = getIndex();
74 for (int i = 0; i < getIndex(); i++)
75 {
76 if (readers.getFileSize(static_cast<std::size_t>(i)) == 0)
77 continue; // Content file in non-ESM format
78 const auto fnamecandidate
79 = Files::pathToUnicodeString(readers.getName(static_cast<std::size_t>(i)).filename());
80 if (Misc::StringUtils::ciEqual(fname, fnamecandidate))
81 {
82 index = i;
83 break;
84 }
85 }
86 mCtx.parentFileIndices.push_back(index);
87 }
88 }
89
90 bool ESMReader::applyContentFileMapping(FormId& id)
91 {

Callers 4

shallowLoadFunction · 0.80
continueLoadingMethod · 0.80
TESTFunction · 0.80
loadMethod · 0.80

Calls 5

ciEqualFunction · 0.85
clearMethod · 0.45
getFileSizeMethod · 0.45
filenameMethod · 0.45
getNameMethod · 0.45

Tested by 1

TESTFunction · 0.64