MCPcopy Create free account
hub / github.com/ddnet/ddnet / OpenMap

Function OpenMap

src/tools/map_find_env.cpp:19–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17};
18
19static bool OpenMap(const char pMapName[64], CDataFileReader &InputMap)
20{
21 std::unique_ptr<IStorage> pStorage = CreateLocalStorage();
22 if(!pStorage)
23 {
24 log_error("map_find_env", "Error creating local storage");
25 return false;
26 }
27
28 if(!InputMap.Open(pStorage.get(), pMapName, IStorage::TYPE_ABSOLUTE))
29 {
30 dbg_msg("map_find_env", "ERROR: unable to open map '%s'", pMapName);
31 return false;
32 }
33 return true;
34}
35
36static bool GetLayerGroupIds(CDataFileReader &InputMap, const int LayerNumber, int &GroupId, int &LayerRelativeId)
37{

Callers 1

FindEnvFunction · 0.85

Calls 4

CreateLocalStorageFunction · 0.85
dbg_msgFunction · 0.85
getMethod · 0.80
OpenMethod · 0.45

Tested by

no test coverage detected