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

Function getPath

src/OpenLoco/src/Environment.cpp:156–176  ·  view source on GitHub ↗

0x004416B5

Source from the content-addressed store, hash-verified

154
155 // 0x004416B5
156 fs::path getPath(PathId id)
157 {
158 fs::path result = getPathNoWarning(id);
159 if (!fs::exists(result))
160 {
161#ifndef _WIN32
162 auto similarResult = findSimilarFile(result);
163 if (similarResult.empty())
164 {
165 Logging::error("Warning: file {} could not be found", result.u8string());
166 }
167 else
168 {
169 result = similarResult;
170 }
171#else
172 Logging::error("Warning: file {} could not be found", result.u8string());
173#endif
174 }
175 return result;
176 }
177
178 static fs::path getDefaultPathNoWarning(PathId id)
179 {

Callers 15

loadTitleFunction · 0.85
loadSaveGameOpenFunction · 0.85
loadLandscapeOpenFunction · 0.85
loadHeightmapOpenFunction · 0.85
saveScenarioOpenFunction · 0.85
saveLandscapeOpenFunction · 0.85
autosaveCleanFunction · 0.85
autosaveFunction · 0.85
startFunction · 0.85
resolvePathsFunction · 0.85
loadG1Function · 0.85
loadMusicSampleFunction · 0.85

Calls 4

getPathNoWarningFunction · 0.85
findSimilarFileFunction · 0.85
errorFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected