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

Method getMap

Source/Campaign.cpp:263–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263tSharedBuffer cCampaign::getMap(std::shared_ptr<cPhase> pPhase) const {
264 std::string FinalName = pPhase->mMapFilename + ".map";
265 std::string FinalPath = GetPathToFile(FinalName);
266
267 // If no campaign folder exists, load from the currently loaded resource
268 if (!g_ResourceMan->FileExists(FinalPath))
269 return g_Resource->fileGet(FinalName);
270
271 // Otherwise load it from the campaign path
272 return g_ResourceMan->FileRead(FinalPath);
273}
274
275tSharedBuffer cCampaign::getSprites(std::shared_ptr<cPhase> pPhase) const {
276 std::string FinalName = pPhase->mMapFilename + ".spt";

Callers

nothing calls this directly

Calls 3

FileExistsMethod · 0.80
FileReadMethod · 0.80
fileGetMethod · 0.45

Tested by

no test coverage detected