nuke Qexpand_squiggle. instead, expand ~ to $HOME on qfs initialization and

cache the value.

don't call Qopen directly in the engine. instead call QFS_Open (generic) or
QFS_WOpen (write only, zip flag).

rework QFS_NextFilename to use a dstring (avoiding a potential buffer
overflow), support 10000 files and work from the top-level fs_userpath
directory. adjust QFS_WriteFile and QFS_WriteBuffers etc to suit.

make sw32 screenshots actually get written.

hopefully everything gets written to the right places :)
This commit is contained in:
Bill Currie 2003-05-23 17:17:01 +00:00
parent c5be2fb501
commit c2c3a62956
28 changed files with 254 additions and 630 deletions

View file

@ -162,8 +162,7 @@ bi_File_Open (progs_t *pr)
if (do_write && !file_writeable (path))
goto error;
*file = Qopen (va ("%s/%s/%s", fs_userpath->string,
qfs_gamedir->dir.def, path), mode);
*file = QFS_Open (va ("%s/%s", qfs_gamedir->dir.def, path), mode);
if (!*file)
goto error;
R_INT (pr) = (file - res->handles) + 1;

View file

@ -127,7 +127,7 @@ bi_QFS_WriteFile (progs_t *pr)
int count = P_INT (pr, 2);
check_buffer (pr, buf, count, "QFS_WriteFile");
QFS_WriteFile (filename, buf, count);
QFS_WriteFile (va ("%s/%s", qfs_gamedir->dir.def, filename), buf, count);
}
void