fixme: make all calls go through this new function.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@793 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-01-16 02:26:54 +00:00
parent 17e9ea55a7
commit ca3f6d69a6

View file

@ -2480,6 +2480,8 @@ void COM_WriteFile (char *filename, void *data, int len)
sprintf (name, "%s/%s", com_gamedir, filename);
COM_CreatePath(name);
f = fopen (name, "wb");
if (!f)
{
@ -2499,6 +2501,20 @@ void COM_WriteFile (char *filename, void *data, int len)
com_fschanged=true;
}
FILE *COM_WriteFileOpen (char *filename) //like fopen, but based around quake's paths.
{
FILE *f;
char name[MAX_OSPATH];
sprintf (name, "%s/%s", com_gamedir, filename);
COM_CreatePath(name);
f = fopen (name, "wb");
return f;
}
/*
============