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

Function writexmap

source/src/worldio.cpp:1614–1622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1612char *xmapfilename(const char *nick, const char *prefix = "") { static defformatstring(fn)("%s/%s%s.xmap", xmapspath, prefix, nick); return path(fn); }
1613
1614void writexmap(xmap *xm, const char *prefix = "")
1615{
1616 stream *f = openfile(xmapfilename(xm->nick, prefix), "w");
1617 if(f)
1618 {
1619 xm->write(f);
1620 delete f;
1621 }
1622}
1623
1624void writeallxmaps() // at game exit, write all xmaps to cubescript files in mapediting/xmaps
1625{

Callers 1

writeallxmapsFunction · 0.85

Calls 3

openfileFunction · 0.85
xmapfilenameFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected