MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / getDataFilePath

Method getDataFilePath

Source/Versions.cpp:308–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308std::string sGameVersion::getDataFilePath(std::string pFile) const {
309
310 // First try get the file from found files in the data folder
311 auto path = g_ResourceMan->GetFilePath(this, pFile);
312 if (path.size())
313 return path;
314
315 // If its custom, check the retail data
316 if (isCustom()) {
317 path = g_Fodder->mVersions->GetRetail(mPlatform, mGame)->getDataFilePath(pFile);
318 if (path.size() && g_ResourceMan->FileExists(path))
319 return path;
320 }
321
322 // Fall back to the data folder
323 return g_ResourceMan->FindVersionPath(this) + pFile;
324}
325
326std::vector<eGFX_Types> sGameVersion::getGfxTypes() const {
327 switch (mRelease) {

Callers 3

fileGetMethod · 0.80
cResource_PC_CDMethod · 0.80
Music_PlayFileMethod · 0.80

Calls 5

GetFilePathMethod · 0.80
GetRetailMethod · 0.80
FileExistsMethod · 0.80
FindVersionPathMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected