]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_edict.c
gzip support from quakeforge (QFile and friends). also includes a couple of
[xonotic/darkplaces.git] / pr_edict.c
index cec47e822e310a5094451d2271e9a195294f762f..49253e181b967eac72bc81474c71db12bbb57b78 100644 (file)
@@ -599,7 +599,7 @@ ED_Write
 For savegames
 =============
 */
-void ED_Write (FILE *f, edict_t *ed)
+void ED_Write (QFile *f, edict_t *ed)
 {
        ddef_t  *d;
        int             *v;
@@ -607,11 +607,11 @@ void ED_Write (FILE *f, edict_t *ed)
        char    *name;
        int             type;
 
-       fprintf (f, "{\n");
+       Qprintf (f, "{\n");
 
        if (ed->free)
        {
-               fprintf (f, "}\n");
+               Qprintf (f, "}\n");
                return;
        }
        
@@ -632,11 +632,11 @@ void ED_Write (FILE *f, edict_t *ed)
                if (j == type_size[type])
                        continue;
        
-               fprintf (f,"\"%s\" ",name);
-               fprintf (f,"\"%s\"\n", PR_UglyValueString(d->type, (eval_t *)v));               
+               Qprintf (f,"\"%s\" ",name);
+               Qprintf (f,"\"%s\"\n", PR_UglyValueString(d->type, (eval_t *)v));               
        }
 
-       fprintf (f, "}\n");
+       Qprintf (f, "}\n");
 }
 
 void ED_PrintNum (int ent)
@@ -730,14 +730,14 @@ FIXME: need to tag constants, doesn't really work
 ED_WriteGlobals
 =============
 */
-void ED_WriteGlobals (FILE *f)
+void ED_WriteGlobals (QFile *f)
 {
        ddef_t          *def;
        int                     i;
        char            *name;
        int                     type;
 
-       fprintf (f,"{\n");
+       Qprintf (f,"{\n");
        for (i=0 ; i<progs->numglobaldefs ; i++)
        {
                def = &pr_globaldefs[i];
@@ -750,10 +750,10 @@ void ED_WriteGlobals (FILE *f)
                        continue;
 
                name = pr_strings + def->s_name;                
-               fprintf (f,"\"%s\" ", name);
-               fprintf (f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));              
+               Qprintf (f,"\"%s\" ", name);
+               Qprintf (f,"\"%s\"\n", PR_UglyValueString(type, (eval_t *)&pr_globals[def->ofs]));              
        }
-       fprintf (f,"}\n");
+       Qprintf (f,"}\n");
 }
 
 /*