*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1177 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2007-07-26 01:17:04 +00:00
parent 9b91dc4a25
commit a13aadb796
15 changed files with 340 additions and 138 deletions
+3 -3
View File
@@ -106,7 +106,7 @@ void writemap(char *mname, int msize, uchar *mdata)
{
setnames(mname);
backup(cgzname, bakname);
FILE *f = fopen(cgzname, "wb");
FILE *f = openfile(cgzname, "wb");
if(!f) { conoutf("could not write map to %s", cgzname); return; }
fwrite(mdata, 1, msize, f);
fclose(f);
@@ -133,7 +133,7 @@ void save_world(char *mname)
toptimize();
setnames(mname);
backup(cgzname, bakname);
gzFile f = gzopen(cgzname, "wb9");
gzFile f = opengzfile(cgzname, "wb9");
if(!f) { conoutf("could not write map to %s", cgzname); return; }
hdr.version = MAPVERSION;
hdr.numents = 0;
@@ -214,7 +214,7 @@ void load_world(char *mname) // still supports all map formats that have
cleardlights();
pruneundos();
setnames(mname);
gzFile f = gzopen(cgzname, "rb9");
gzFile f = opengzfile(cgzname, "rb9");
if(!f) { conoutf("could not read map %s", cgzname); return; }
loadingscreen();
gzread(f, &hdr, sizeof(header)-sizeof(int)*16);