MCPcopy Create free account
hub / github.com/assaultcube/AC / writemap

Function writemap

source/src/worldio.cpp:43–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41// these two are used by getmap/sendmap.. transfers compressed maps directly
42
43void writemap(const char *name, int msize, uchar *mdata)
44{
45 setnames(name);
46 backup(cgzname, bakname);
47 stream *f = openfile(cgzname, "wb");
48 if(!f) { conoutf("\f3could not write map to %s", cgzname); return; }
49 f->write(mdata, msize);
50 delete f;
51 conoutf("wrote map %s as file %s", name, cgzname);
52}
53
54uchar *readmap(const char *name, int *size, int *revision)
55{

Callers 1

receivefileFunction · 0.85

Calls 5

setnamesFunction · 0.85
backupFunction · 0.85
openfileFunction · 0.85
conoutfFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected