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

Method getSprites

Source/Campaign.cpp:275–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275tSharedBuffer cCampaign::getSprites(std::shared_ptr<cPhase> pPhase) const {
276 std::string FinalName = pPhase->mMapFilename + ".spt";
277 std::string FinalPath = GetPathToFile(FinalName);
278
279 // If no campaign folder exists, load from the currently loaded resource
280 if (!g_ResourceMan->FileExists(FinalPath))
281 return g_Resource->fileGet(FinalName);
282
283 // Otherwise load it from the campaign path
284 return g_ResourceMan->FileRead(FinalPath);
285}
286
287/**
288 * Get the mission

Callers

nothing calls this directly

Calls 3

FileExistsMethod · 0.80
FileReadMethod · 0.80
fileGetMethod · 0.45

Tested by

no test coverage detected