mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
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:
parent
17e9ea55a7
commit
ca3f6d69a6
1 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
============
|
||||
|
|
Loading…
Reference in a new issue