| 41 | // these two are used by getmap/sendmap.. transfers compressed maps directly |
| 42 | |
| 43 | void 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 | |
| 54 | uchar *readmap(const char *name, int *size, int *revision) |
| 55 | { |