diff --git a/include/QF/Makefile.am b/include/QF/Makefile.am index d1d6c0f20..fc3a277dc 100644 --- a/include/QF/Makefile.am +++ b/include/QF/Makefile.am @@ -7,6 +7,6 @@ include_HEADERS = bspfile.h cbuf.h cdaudio.h checksum.h clip_hull.h cmd.h \ gib_vars.h hash.h hl.h idparse.h in_event.h info.h input.h joystick.h \ keys.h link.h locs.h mathlib.h mdfour.h model.h modelgen.h msg.h pak.h \ pakfile.h pcx.h plugin.h pr_comp.h pr_debug.h pr_obj.h progs.h qargs.h \ - qdefs.h qendian.h qfplist.h qtypes.h render.h screen.h sizebuf.h skin.h \ - sound.h spritegn.h sys.h teamplay.h texture.h tga.h uint32.h va.h \ - ver_check.h vfile.h vfs.h vid.h wad.h zone.h + qdefs.h qendian.h qfplist.h qtypes.h quakefs.h quakeio.h render.h \ + screen.h sizebuf.h skin.h sound.h spritegn.h sys.h teamplay.h texture.h \ + tga.h uint32.h va.h ver_check.h vid.h wad.h zone.h diff --git a/include/QF/cvar.h b/include/QF/cvar.h index b9869b2e7..658a675dc 100644 --- a/include/QF/cvar.h +++ b/include/QF/cvar.h @@ -30,7 +30,7 @@ #define __cvar_h #include "QF/qtypes.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" typedef struct cvar_s { @@ -108,7 +108,7 @@ qboolean Cvar_Command (void); // Writes lines containing "set variable value" for all variables // with the archive flag set to true. -void Cvar_WriteVariables (VFile *f); +void Cvar_WriteVariables (QFile *f); // Added by EvilTypeGuy - functions for tab completion system // Thanks to Fett erich@heintz.com diff --git a/include/QF/keys.h b/include/QF/keys.h index b9d01ca56..34667633b 100644 --- a/include/QF/keys.h +++ b/include/QF/keys.h @@ -32,7 +32,7 @@ #ifndef __QFCC__ # include "QF/qtypes.h" -# include "QF/vfile.h" +# include "QF/quakeio.h" #endif // these are the key numbers that should be passed to Key_Event @@ -387,7 +387,7 @@ struct cbuf_s; void Key_Event (knum_t key, short unicode, qboolean down); void Key_Init (struct cbuf_s *cb); void Key_Init_Cvars (void); -void Key_WriteBindings (VFile *f); +void Key_WriteBindings (QFile *f); void Key_ClearStates (void); const char *Key_GetBinding (imt_t imt, knum_t key); void Key_SetBinding (imt_t target, knum_t keynum, const char *binding); diff --git a/include/QF/pakfile.h b/include/QF/pakfile.h index 7f8c5adf3..442f8f8be 100644 --- a/include/QF/pakfile.h +++ b/include/QF/pakfile.h @@ -31,13 +31,13 @@ #ifndef __QF_pakfile_h #define __QF_pakfile_h -#include "QF/vfile.h" #include "QF/hash.h" #include "QF/pak.h" +#include "QF/quakeio.h" typedef struct pack_s { char *filename; - VFile *handle; + QFile *handle; int numfiles; int files_size; dpackfile_t *files; diff --git a/include/QF/pcx.h b/include/QF/pcx.h index 0a9a95d57..3069d9303 100644 --- a/include/QF/pcx.h +++ b/include/QF/pcx.h @@ -30,7 +30,7 @@ #define __pcx_h #include "QF/qtypes.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" typedef struct { @@ -50,6 +50,6 @@ typedef struct pcx_t *EncodePCX (byte * data, int width, int height, int rowbytes, byte * palette, qboolean flip, int *length); -struct tex_s *LoadPCX (VFile *f, int convert, byte *pal); // tex is from Hunk_TempAlloc +struct tex_s *LoadPCX (QFile *f, int convert, byte *pal); // tex is from Hunk_TempAlloc #endif // __pcx_h diff --git a/include/QF/progs.h b/include/QF/progs.h index 7bd6972b3..5b6d59f84 100644 --- a/include/QF/progs.h +++ b/include/QF/progs.h @@ -30,9 +30,9 @@ #define __QF_progs_h #include "QF/link.h" -#include "QF/vfile.h" #include "QF/pr_comp.h" #include "QF/pr_debug.h" +#include "QF/quakeio.h" #define MAX_ENT_LEAFS 16 typedef struct edict_s @@ -66,7 +66,7 @@ void PR_Init_Cvars (void); void PR_PrintStatement (progs_t * pr, dstatement_t *s); void PR_ExecuteProgram (progs_t *pr, func_t fnum); -void PR_LoadProgsFile (progs_t * pr, VFile *file, int size, int edicts, +void PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone); void PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone); void PR_LoadStrings (progs_t *pr); @@ -84,10 +84,10 @@ char *ED_NewString (progs_t *pr, const char *string); // returns a copy of the string allocated from the server's string heap void ED_Print (progs_t *pr, edict_t *ed); -void ED_Write (progs_t *pr, VFile *f, edict_t *ed); +void ED_Write (progs_t *pr, QFile *f, edict_t *ed); const char *ED_ParseEdict (progs_t *pr, const char *data, edict_t *ent); -void ED_WriteGlobals (progs_t *pr, VFile *f); +void ED_WriteGlobals (progs_t *pr, QFile *f); void ED_ParseGlobals (progs_t *pr, const char *data); void ED_LoadFromFile (progs_t *pr, const char *data); diff --git a/include/QF/vfs.h b/include/QF/quakefs.h similarity index 92% rename from include/QF/vfs.h rename to include/QF/quakefs.h index e06bdd930..587319c21 100644 --- a/include/QF/vfs.h +++ b/include/QF/quakefs.h @@ -32,7 +32,7 @@ #define __quakefs_h #include "QF/qtypes.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" //============================================================================ @@ -61,10 +61,10 @@ extern char gamedirfile[MAX_OSPATH]; void COM_WriteFile (const char *filename, void *data, int len); void COM_WriteBuffers (const char *filename, int count, ...); -int _COM_FOpenFile (const char *filename, VFile **gzfile, char *foundname, int zip); -int COM_FOpenFile (const char *filename, VFile **gzfile); -void COM_CloseFile (VFile *h); -int COM_filelength (VFile *f); +int _COM_FOpenFile (const char *filename, QFile **gzfile, char *foundname, int zip); +int COM_FOpenFile (const char *filename, QFile **gzfile); +void COM_CloseFile (QFile *h); +int COM_filelength (QFile *f); void COM_FileBase (const char *in, char *out); void COM_DefaultExtension (char *path, char *extension); const char *COM_SkipPath (const char *pathname); diff --git a/include/QF/vfile.h b/include/QF/quakeio.h similarity index 62% rename from include/QF/vfile.h rename to include/QF/quakeio.h index 32148f22d..ad2e9dd0a 100644 --- a/include/QF/vfile.h +++ b/include/QF/quakeio.h @@ -34,26 +34,26 @@ #include "QF/gcc_attr.h" -typedef struct VFile_s VFile; +typedef struct VFile_s QFile; void Qexpand_squiggle(const char *path, char *dest); int Qrename(const char *old, const char *new); -VFile *Qopen(const char *path, const char *mode); -VFile *Qdopen(int fd, const char *mode); -void Qclose(VFile *file); -int Qread(VFile *file, void *buf, int count); -int Qwrite(VFile *file, const void *buf, int count); -int Qprintf(VFile *file, const char *fmt, ...) __attribute__((format(printf,2,3))); -int Qputs(VFile *file, const char *buf); -char *Qgets(VFile *file, char *buf, int count); -int Qgetc(VFile *file); -int Qputc(VFile *file, int c); -int Qseek(VFile *file, long offset, int whence); -long Qtell(VFile *file); -int Qflush(VFile *file); -int Qeof(VFile *file); -const char *Qgetline(VFile *file); -int Qgetpos(VFile *file, fpos_t *pos); -int Qsetpos(VFile *file, fpos_t *pos); +QFile *Qopen(const char *path, const char *mode); +QFile *Qdopen(int fd, const char *mode); +void Qclose(QFile *file); +int Qread(QFile *file, void *buf, int count); +int Qwrite(QFile *file, const void *buf, int count); +int Qprintf(QFile *file, const char *fmt, ...) __attribute__((format(printf,2,3))); +int Qputs(QFile *file, const char *buf); +char *Qgets(QFile *file, char *buf, int count); +int Qgetc(QFile *file); +int Qputc(QFile *file, int c); +int Qseek(QFile *file, long offset, int whence); +long Qtell(QFile *file); +int Qflush(QFile *file); +int Qeof(QFile *file); +const char *Qgetline(QFile *file); +int Qgetpos(QFile *file, fpos_t *pos); +int Qsetpos(QFile *file, fpos_t *pos); #endif /*__quakeio_h*/ diff --git a/include/QF/tga.h b/include/QF/tga.h index 36e9db7af..e398a4a65 100644 --- a/include/QF/tga.h +++ b/include/QF/tga.h @@ -31,7 +31,7 @@ #include "QF/gcc_attr.h" #include "QF/qtypes.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" #ifndef __GNUC__ # if defined (__BORLANDC__) || defined (_MSC_VER) @@ -69,7 +69,7 @@ typedef struct _TargaHeader { # endif #endif -struct tex_s *LoadTGA (VFile *fin); +struct tex_s *LoadTGA (QFile *fin); void WriteTGAfile (const char *tganame, byte *data, int width, int height); #endif // __tga_h diff --git a/include/old_keys.h b/include/old_keys.h index e4d9848a9..eaf5ba1d3 100644 --- a/include/old_keys.h +++ b/include/old_keys.h @@ -33,7 +33,7 @@ #ifndef __keys_h #define __keys_h -#include "QF/vfile.h" +#include "QF/quakeio.h" void OK_Init (void); const char *OK_TranslateKeyName (const char *name); diff --git a/libs/audio/renderer/snd_mem.c b/libs/audio/renderer/snd_mem.c index 65b4d3622..250e8f364 100644 --- a/libs/audio/renderer/snd_mem.c +++ b/libs/audio/renderer/snd_mem.c @@ -38,17 +38,17 @@ static const char rcsid[] = #endif #include "QF/cvar.h" -#include "QF/qendian.h" #include "QF/sound.h" #include "QF/sys.h" -#include "QF/vfs.h" +#include "QF/qendian.h" +#include "QF/quakefs.h" int cache_full_cycle; byte *SND_Alloc (int size); wavinfo_t SND_GetWavinfo (const char *name, byte * wav, int wavlength); sfxcache_t *SND_LoadSound (sfx_t *sfx, cache_allocator_t allocator); -sfxcache_t *SND_LoadOgg (VFile *file, sfx_t *sfx, cache_allocator_t allocator); +sfxcache_t *SND_LoadOgg (QFile *file, sfx_t *sfx, cache_allocator_t allocator); sfxcache_t * SND_GetCache (long samples, int rate, int inwidth, int channels, @@ -193,7 +193,7 @@ SND_LoadSound (sfx_t *sfx, cache_allocator_t allocator) float stepscale; sfxcache_t *sc; byte stackbuf[1 * 1024]; // avoid dirtying the cache heap - VFile *file; + QFile *file; // load it in strcpy (namebuffer, "sound/"); diff --git a/libs/audio/renderer/vorbis.c b/libs/audio/renderer/vorbis.c index ff278aa30..eb1908f6e 100644 --- a/libs/audio/renderer/vorbis.c +++ b/libs/audio/renderer/vorbis.c @@ -48,7 +48,7 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/sound.h" #include "QF/sys.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" //FIXME should be in header void SND_ResampleSfx (sfxcache_t *sc, byte * data); @@ -88,7 +88,7 @@ static ov_callbacks callbacks = { }; sfxcache_t * -SND_LoadOgg (VFile *file, sfx_t *sfx, cache_allocator_t allocator) +SND_LoadOgg (QFile *file, sfx_t *sfx, cache_allocator_t allocator) { OggVorbis_File vf; vorbis_info *vi; @@ -157,10 +157,10 @@ SND_LoadOgg (VFile *file, sfx_t *sfx, cache_allocator_t allocator) #include "QF/sound.h" #include "QF/sys.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" sfxcache_t * -SND_LoadOgg (VFile *file, sfx_t *sfx, cache_allocator_t allocator) +SND_LoadOgg (QFile *file, sfx_t *sfx, cache_allocator_t allocator) { Sys_Printf ("Ogg/Vorbis support not available, sorry.\n"); Qclose (file); diff --git a/libs/audio/targets/snd_disk.c b/libs/audio/targets/snd_disk.c index c1eb0f889..1d5918f73 100644 --- a/libs/audio/targets/snd_disk.c +++ b/libs/audio/targets/snd_disk.c @@ -53,7 +53,7 @@ static const char rcsid[] = #include "QF/sys.h" static int snd_inited; -static VFile *snd_file; +static QFile *snd_file; static int snd_blocked = 0; //FIXME static volatile dma_t sn; diff --git a/libs/console/client.c b/libs/console/client.c index 9c8d08e84..94d9254c1 100644 --- a/libs/console/client.c +++ b/libs/console/client.c @@ -50,11 +50,11 @@ static const char rcsid[] = #include "QF/keys.h" #include "QF/plugin.h" #include "QF/qargs.h" +#include "QF/quakefs.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/va.h" #include "QF/vid.h" -#include "QF/vfs.h" #include "compat.h" @@ -236,7 +236,7 @@ Condump_f (void) { int line = con->current - con->numlines; const char *start, *end; - VFile *file; + QFile *file; char name[MAX_OSPATH]; if (Cmd_Argc () != 2) { diff --git a/libs/console/filelist.c b/libs/console/filelist.c index b6bd95081..5e68b536d 100644 --- a/libs/console/filelist.c +++ b/libs/console/filelist.c @@ -74,9 +74,9 @@ static const char rcsid[] = #include "QF/qargs.h" #include "QF/qendian.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "QF/zone.h" #include "compat.h" diff --git a/libs/console/menu.c b/libs/console/menu.c index b8c5da2c5..4fe04ae28 100644 --- a/libs/console/menu.c +++ b/libs/console/menu.c @@ -41,9 +41,9 @@ static const char rcsid[] = #include "QF/hash.h" #include "QF/plugin.h" #include "QF/progs.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/sys.h" -#include "QF/vfs.h" //FIXME need a better way to communicate this (bah, need a better menu system // in general :P) @@ -458,7 +458,7 @@ void Menu_Load (void) { int size; - VFile *file; + QFile *file; menu_pr_state.time = con_data.realtime; diff --git a/libs/console/server.c b/libs/console/server.c index ee5663482..ae1433cb2 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -63,16 +63,15 @@ static const char rcsid[] = #include "QF/keys.h" #include "QF/plugin.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "compat.h" static console_data_t con_data; -static VFile *log_file; +static QFile *log_file; static cvar_t *sv_logfile; #ifdef HAVE_CURSES_H diff --git a/libs/gamecode/builtins/bi_file.c b/libs/gamecode/builtins/bi_file.c index 5c238272d..0ed963f67 100644 --- a/libs/gamecode/builtins/bi_file.c +++ b/libs/gamecode/builtins/bi_file.c @@ -53,12 +53,12 @@ int fnmatch (const char *__pattern, const char *__string, int __flags); #endif #include "QF/progs.h" +#include "QF/quakefs.h" #include "QF/va.h" -#include "QF/vfs.h" #include "QF/zone.h" #define MAX_HANDLES 20 -static VFile *handles[MAX_HANDLES]; +static QFile *handles[MAX_HANDLES]; static const char *file_ban_list[] = { "default.cfg{,.gz}", diff --git a/libs/gamecode/engine/pr_builtins.c b/libs/gamecode/engine/pr_builtins.c index 053081d77..2b21ba345 100644 --- a/libs/gamecode/engine/pr_builtins.c +++ b/libs/gamecode/engine/pr_builtins.c @@ -46,10 +46,10 @@ static const char rcsid[] = #include "QF/progs.h" #include "QF/qdefs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/zone.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" diff --git a/libs/gamecode/engine/pr_debug.c b/libs/gamecode/engine/pr_debug.c index bc25b8a3e..1f022c614 100644 --- a/libs/gamecode/engine/pr_debug.c +++ b/libs/gamecode/engine/pr_debug.c @@ -47,8 +47,8 @@ static const char rcsid[] = #include "QF/pr_debug.h" #include "QF/progs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "QF/zone.h" typedef struct { diff --git a/libs/gamecode/engine/pr_edict.c b/libs/gamecode/engine/pr_edict.c index aa0d5a1c2..4cf3230d4 100644 --- a/libs/gamecode/engine/pr_edict.c +++ b/libs/gamecode/engine/pr_edict.c @@ -47,10 +47,10 @@ static const char rcsid[] = #include "QF/progs.h" #include "QF/qdefs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/zone.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" @@ -488,7 +488,7 @@ ED_Print (progs_t * pr, edict_t *ed) For savegames */ void -ED_Write (progs_t * pr, VFile *f, edict_t *ed) +ED_Write (progs_t * pr, QFile *f, edict_t *ed) { ddef_t *d; pr_type_t *v; @@ -609,7 +609,7 @@ ED_Count (progs_t * pr) ED_WriteGlobals */ void -ED_WriteGlobals (progs_t * pr, VFile *f) +ED_WriteGlobals (progs_t * pr, QFile *f) { ddef_t *def; int i; diff --git a/libs/gamecode/engine/pr_load.c b/libs/gamecode/engine/pr_load.c index 35c55ffe6..987836f31 100644 --- a/libs/gamecode/engine/pr_load.c +++ b/libs/gamecode/engine/pr_load.c @@ -46,10 +46,10 @@ static const char rcsid[] = #include "QF/progs.h" #include "QF/qdefs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/zone.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" @@ -87,7 +87,7 @@ free_progs_mem (progs_t *pr, void *mem) } void -PR_LoadProgsFile (progs_t * pr, VFile *file, int size, int edicts, int zone) +PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone) { int i; dprograms_t progs; @@ -259,7 +259,7 @@ PR_LoadProgsFile (progs_t * pr, VFile *file, int size, int edicts, int zone) void PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone) { - VFile *file; + QFile *file; COM_FOpenFile (progsname, &file); pr->progs_name = progsname; diff --git a/libs/gamecode/engine/pr_resolve.c b/libs/gamecode/engine/pr_resolve.c index a24e76bf2..afee18e97 100644 --- a/libs/gamecode/engine/pr_resolve.c +++ b/libs/gamecode/engine/pr_resolve.c @@ -46,10 +46,10 @@ static const char rcsid[] = #include "QF/progs.h" #include "QF/qdefs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/zone.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" diff --git a/libs/models/alias/gl_mesh.c b/libs/models/alias/gl_mesh.c index 7d952e264..b71d65da8 100644 --- a/libs/models/alias/gl_mesh.c +++ b/libs/models/alias/gl_mesh.c @@ -42,8 +42,8 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/mdfour.h" #include "QF/model.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "compat.h" @@ -338,7 +338,7 @@ Mod_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s, i unsigned char mesh_digest[MDFOUR_DIGEST_BYTES]; int i, j; int *cmds; - VFile *f; + QFile *f; qboolean remesh = true; qboolean do_cache = false; diff --git a/libs/models/alias/gl_model_alias.c b/libs/models/alias/gl_model_alias.c index 6434bce1f..8fbf1eb0b 100644 --- a/libs/models/alias/gl_model_alias.c +++ b/libs/models/alias/gl_model_alias.c @@ -42,11 +42,11 @@ static const char rcsid[] = #include "QF/model.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/skin.h" #include "QF/sys.h" #include "QF/texture.h" #include "QF/tga.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/GL/qf_textures.h" @@ -268,7 +268,7 @@ void Mod_LoadExternalSkin (maliasskindesc_t *pskindesc, char *filename) { tex_t *targa; - VFile *f; + QFile *f; COM_FOpenFile (filename, &f); if (f) diff --git a/libs/models/alias/model_alias.c b/libs/models/alias/model_alias.c index eeede21ae..eea14475a 100644 --- a/libs/models/alias/model_alias.c +++ b/libs/models/alias/model_alias.c @@ -44,8 +44,8 @@ static const char rcsid[] = #include "QF/model.h" #include "QF/msg.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "compat.h" #include "d_iface.h" diff --git a/libs/models/brush/gl_model_brush.c b/libs/models/brush/gl_model_brush.c index 5d562c3db..dcd564f5e 100644 --- a/libs/models/brush/gl_model_brush.c +++ b/libs/models/brush/gl_model_brush.c @@ -42,10 +42,10 @@ static const char rcsid[] = #include "QF/model.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/texture.h" #include "QF/tga.h" -#include "QF/vfs.h" #include "QF/GL/qf_textures.h" #include "compat.h" @@ -73,7 +73,7 @@ Mod_LoadExternalTextures (model_t *mod) int length, i; tex_t *targa; texture_t *tx; - VFile *f; + QFile *f; for (i = 0; i < mod->numtextures; i++) { diff --git a/libs/models/model.c b/libs/models/model.c index b929ca1f5..f41570c5c 100644 --- a/libs/models/model.c +++ b/libs/models/model.c @@ -43,8 +43,8 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/model.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "compat.h" diff --git a/libs/models/sprite/gl_model_sprite.c b/libs/models/sprite/gl_model_sprite.c index a73548212..e06a12f15 100644 --- a/libs/models/sprite/gl_model_sprite.c +++ b/libs/models/sprite/gl_model_sprite.c @@ -39,9 +39,9 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/model.h" +#include "QF/quakefs.h" #include "QF/texture.h" #include "QF/tga.h" -#include "QF/vfs.h" #include "QF/GL/qf_textures.h" #include "compat.h" @@ -52,7 +52,7 @@ Mod_SpriteLoadTexture (mspriteframe_t *pspriteframe, int framenum) char name[64]; char filename[MAX_QPATH + 4]; tex_t *targa; - VFile *f; + QFile *f; snprintf (name, sizeof (name), "%s_%i", loadmodel->name, framenum); diff --git a/libs/util/bspfile.c b/libs/util/bspfile.c index 988bf4b09..6a02880b6 100644 --- a/libs/util/bspfile.c +++ b/libs/util/bspfile.c @@ -46,9 +46,8 @@ static const char rcsid[] = #include "QF/bspfile.h" #include "QF/qendian.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfile.h" -#include "QF/vfs.h" int nummodels; dmodel_t dmodels[MAX_MAP_MODELS]; @@ -97,7 +96,7 @@ int dsurfedges[MAX_MAP_SURFEDGES]; dheader_t *header; dheader_t outheader; -VFile *wadfile; +QFile *wadfile; /* diff --git a/libs/util/cmd.c b/libs/util/cmd.c index f9e3321ff..9f80d5ddf 100644 --- a/libs/util/cmd.c +++ b/libs/util/cmd.c @@ -47,13 +47,13 @@ static const char rcsid[] = #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/dstring.h" -#include "QF/hash.h" -#include "QF/qargs.h" -#include "QF/sys.h" -#include "QF/vfs.h" -#include "QF/zone.h" #include "QF/gib_builtin.h" #include "QF/gib_parse.h" +#include "QF/hash.h" +#include "QF/qargs.h" +#include "QF/quakefs.h" +#include "QF/sys.h" +#include "QF/zone.h" typedef struct cmdalias_s { struct cmdalias_s *next; @@ -614,7 +614,7 @@ Cmd_Exec_File (cbuf_t *cbuf, const char *path) { char *f; int len; - VFile *file; + QFile *file; if (!path || !*path) return; diff --git a/libs/util/cvar.c b/libs/util/cvar.c index 9e39b0357..3d58ee945 100644 --- a/libs/util/cvar.c +++ b/libs/util/cvar.c @@ -47,9 +47,9 @@ static const char rcsid[] = #include "QF/hash.h" #include "QF/mathlib.h" #include "QF/qargs.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" @@ -330,7 +330,7 @@ Cvar_Command (void) with the archive flag set to true. */ void -Cvar_WriteVariables (VFile *f) +Cvar_WriteVariables (QFile *f) { cvar_t *var; diff --git a/libs/util/fendian.c b/libs/util/fendian.c index dc9c67d8e..8a140ad66 100644 --- a/libs/util/fendian.c +++ b/libs/util/fendian.c @@ -31,11 +31,11 @@ static const char rcsid[] = "$Id$"; #include "QF/qendian.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" void -WriteFloat (VFile *file, float f) +WriteFloat (QFile *file, float f) { // a float in C is /defined/ to be 32 bits. byte order, can, of course // still make a mess. @@ -49,14 +49,14 @@ WriteFloat (VFile *file, float f) } void -WriteByte (VFile *file, int b) +WriteByte (QFile *file, int b) { byte dat = b & 0xff; Qwrite (file, &dat, 1); } void -WriteShort (VFile *file, unsigned int s) +WriteShort (QFile *file, unsigned int s) { byte dat[2]; @@ -66,7 +66,7 @@ WriteShort (VFile *file, unsigned int s) } void -WriteLong (VFile *file, unsigned int l) +WriteLong (QFile *file, unsigned int l) { byte dat[4]; @@ -78,7 +78,7 @@ WriteLong (VFile *file, unsigned int l) } float -ReadFloat (VFile *file) +ReadFloat (QFile *file) { // a float in C is /defined/ to be 32 bits. byte order, can, of course // still make a mess. @@ -92,7 +92,7 @@ ReadFloat (VFile *file) } byte -ReadByte (VFile *file) +ReadByte (QFile *file) { byte dat; Qread (file, &dat, 1); @@ -100,7 +100,7 @@ ReadByte (VFile *file) } unsigned short -ReadShort (VFile *file) +ReadShort (QFile *file) { byte dat[2]; @@ -109,7 +109,7 @@ ReadShort (VFile *file) } unsigned long -ReadLong (VFile *file) +ReadLong (QFile *file) { byte dat[4]; diff --git a/libs/util/pakfile.c b/libs/util/pakfile.c index 937b61901..ce5c9f99e 100644 --- a/libs/util/pakfile.c +++ b/libs/util/pakfile.c @@ -156,7 +156,7 @@ int pack_add (pack_t *pack, const char *filename) { dpackfile_t *pf; - VFile *file; + QFile *file; char buffer[16384]; int bytes; @@ -234,7 +234,7 @@ pack_extract (pack_t *pack, dpackfile_t *pf) const char *name = pf->name; int count; int len; - VFile *file; + QFile *file; char buffer[16384]; if (make_parents (name) == -1) diff --git a/libs/util/pcx.c b/libs/util/pcx.c index 42c1b76fd..8a28805cf 100644 --- a/libs/util/pcx.c +++ b/libs/util/pcx.c @@ -40,16 +40,16 @@ static const char rcsid[] = #include "QF/pcx.h" #include "QF/qendian.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/texture.h" -#include "QF/vfs.h" #include "QF/zone.h" #include "compat.h" tex_t * -LoadPCX (VFile *f, int convert, byte *pal) +LoadPCX (QFile *f, int convert, byte *pal) { pcx_t *pcx; int pcx_mark; diff --git a/libs/util/qendian.c b/libs/util/qendian.c index 87e418cc7..ca51ad207 100644 --- a/libs/util/qendian.c +++ b/libs/util/qendian.c @@ -37,7 +37,7 @@ static const char rcsid[] = #include "QF/qendian.h" #include "QF/qtypes.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" /* BYTE ORDER FUNCTIONS diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 0ff924da2..52b9fcefa 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -75,9 +75,9 @@ static const char rcsid[] = #include "QF/qargs.h" #include "QF/qendian.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "QF/zone.h" #include "compat.h" @@ -153,7 +153,7 @@ COM_FileBase (const char *in, char *out) int -COM_filelength (VFile *f) +COM_filelength (QFile *f) { int end, pos; @@ -166,9 +166,9 @@ COM_filelength (VFile *f) } int -COM_FileOpenRead (char *path, VFile **hndl) +COM_FileOpenRead (char *path, QFile **hndl) { - VFile *f; + QFile *f; f = Qopen (path, "rbz"); if (!f) { @@ -180,10 +180,10 @@ COM_FileOpenRead (char *path, VFile **hndl) return COM_filelength (f); } -VFile * +QFile * COM_SafeOpenRead (const char *filename) { - VFile *f; + QFile *f; f = Qopen (filename, "rb"); @@ -193,10 +193,10 @@ COM_SafeOpenRead (const char *filename) return f; } -VFile * +QFile * COM_SafeOpenWrite (const char *filename) { - VFile *f; + QFile *f; f = Qopen (filename, "wb"); @@ -207,14 +207,14 @@ COM_SafeOpenWrite (const char *filename) } void -COM_SafeRead (VFile *f, void *buffer, int count) +COM_SafeRead (QFile *f, void *buffer, int count) { if (Qread (f, buffer, count) != (size_t) count) Sys_Error ("File read failure"); } void -COM_SafeWrite (VFile *f, const void *buffer, int count) +COM_SafeWrite (QFile *f, const void *buffer, int count) { if (Qwrite (f, buffer, count) != (size_t) count) Sys_Error ("File read failure"); @@ -225,7 +225,7 @@ LoadFile (const char *filename, void **bufferptr) { int length; void *buffer; - VFile *f; + QFile *f; f = COM_SafeOpenRead (filename); length = COM_filelength (f); @@ -266,7 +266,7 @@ void COM_WriteFile (const char *filename, void *data, int len) { char name[MAX_OSPATH]; - VFile *f; + QFile *f; snprintf (name, sizeof (name), "%s/%s", com_gamedir, filename); @@ -293,7 +293,7 @@ COM_WriteBuffers (const char *filename, int count, ...) { char name[MAX_OSPATH]; va_list args; - VFile *f; + QFile *f; va_start (args, count); @@ -352,7 +352,7 @@ COM_CopyFile (char *netpath, char *cachepath) { int remaining, count; char buf[4096]; - VFile *in, *out; + QFile *in, *out; remaining = COM_FileOpenRead (netpath, &in); COM_CreatePath (cachepath); // create directories up to the cache file @@ -374,7 +374,7 @@ COM_CopyFile (char *netpath, char *cachepath) Qclose (out); } -VFile * +QFile * COM_OpenRead (const char *path, int offs, int len, int zip) { unsigned char id[2], len_bytes[4]; @@ -502,7 +502,7 @@ int file_from_pak; // global indicating file came from pack file ZOID */ static int -open_file (searchpath_t *search, const char *filename, VFile **gzfile, +open_file (searchpath_t *search, const char *filename, QFile **gzfile, char *foundname, int zip) { char netpath[MAX_OSPATH]; @@ -543,7 +543,7 @@ open_file (searchpath_t *search, const char *filename, VFile **gzfile, } int -_COM_FOpenFile (const char *filename, VFile **gzfile, char *foundname, int zip) +_COM_FOpenFile (const char *filename, QFile **gzfile, char *foundname, int zip) { searchpath_t *search; char *path; @@ -601,7 +601,7 @@ ok: } int -COM_FOpenFile (const char *filename, VFile **gzfile) +COM_FOpenFile (const char *filename, QFile **gzfile) { char foundname[MAX_OSPATH]; @@ -621,7 +621,7 @@ int loadsize; byte * COM_LoadFile (const char *path, int usehunk) { - VFile *h; + QFile *h; byte *buf = NULL; char base[32]; int len; diff --git a/libs/util/quakeio.c b/libs/util/quakeio.c index d5d849362..00ac583f1 100644 --- a/libs/util/quakeio.c +++ b/libs/util/quakeio.c @@ -59,8 +59,8 @@ static const char rcsid[] = #include #include "QF/dstring.h" -#include "QF/vfile.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" +#include "QF/quakeio.h" #ifdef WIN32 # ifndef __BORLANDC__ @@ -123,10 +123,10 @@ Qrename (const char *old, const char *new) return rename (e_old, e_new); } -VFile * +QFile * Qopen (const char *path, const char *mode) { - VFile *file; + QFile *file; char m[80], *p; int zip = 0; char e_path[PATH_MAX]; @@ -170,10 +170,10 @@ Qopen (const char *path, const char *mode) return file; } -VFile * +QFile * Qdopen (int fd, const char *mode) { - VFile *file; + QFile *file; char m[80], *p; int zip = 0; @@ -214,7 +214,7 @@ Qdopen (int fd, const char *mode) } void -Qclose (VFile *file) +Qclose (QFile *file) { if (file->file) fclose (file->file); @@ -226,7 +226,7 @@ Qclose (VFile *file) } int -Qread (VFile *file, void *buf, int count) +Qread (QFile *file, void *buf, int count) { if (file->file) return fread (buf, 1, count, file->file); @@ -239,7 +239,7 @@ Qread (VFile *file, void *buf, int count) } int -Qwrite (VFile *file, const void *buf, int count) +Qwrite (QFile *file, const void *buf, int count) { if (file->file) return fwrite (buf, 1, count, file->file); @@ -252,7 +252,7 @@ Qwrite (VFile *file, const void *buf, int count) } int -Qprintf (VFile *file, const char *fmt, ...) +Qprintf (QFile *file, const char *fmt, ...) { va_list args; int ret = -1; @@ -280,7 +280,7 @@ Qprintf (VFile *file, const char *fmt, ...) } int -Qputs (VFile *file, const char *buf) +Qputs (QFile *file, const char *buf) { if (file->file) return fputs (buf, file->file); @@ -293,7 +293,7 @@ Qputs (VFile *file, const char *buf) } char * -Qgets (VFile *file, char *buf, int count) +Qgets (QFile *file, char *buf, int count) { if (file->file) return fgets (buf, count, file->file); @@ -306,7 +306,7 @@ Qgets (VFile *file, char *buf, int count) } int -Qgetc (VFile *file) +Qgetc (QFile *file) { if (file->file) return fgetc (file->file); @@ -319,7 +319,7 @@ Qgetc (VFile *file) } int -Qputc (VFile *file, int c) +Qputc (QFile *file, int c) { if (file->file) return fputc (c, file->file); @@ -332,7 +332,7 @@ Qputc (VFile *file, int c) } int -Qseek (VFile *file, long offset, int whence) +Qseek (QFile *file, long offset, int whence) { if (file->file) return fseek (file->file, offset, whence); @@ -345,7 +345,7 @@ Qseek (VFile *file, long offset, int whence) } long -Qtell (VFile *file) +Qtell (QFile *file) { if (file->file) return ftell (file->file); @@ -358,7 +358,7 @@ Qtell (VFile *file) } int -Qflush (VFile *file) +Qflush (QFile *file) { if (file->file) return fflush (file->file); @@ -371,7 +371,7 @@ Qflush (VFile *file) } int -Qeof (VFile *file) +Qeof (QFile *file) { if (file->file) return feof (file->file); @@ -389,7 +389,7 @@ Qeof (VFile *file) Dynamic length version of Qgets. DO NOT free the buffer. */ const char * -Qgetline (VFile *file) +Qgetline (QFile *file) { static int size = 256; static char *buf = 0; @@ -420,7 +420,7 @@ Qgetline (VFile *file) } int -Qgetpos (VFile *file, fpos_t * pos) +Qgetpos (QFile *file, fpos_t * pos) { #ifdef HAVE_FPOS_T_STRUCT pos->__pos = Qtell (file); @@ -432,7 +432,7 @@ Qgetpos (VFile *file, fpos_t * pos) } int -Qsetpos (VFile *file, fpos_t * pos) +Qsetpos (QFile *file, fpos_t * pos) { #ifdef HAVE_FPOS_T_STRUCT return Qseek (file, pos->__pos, 0); diff --git a/libs/util/tga.c b/libs/util/tga.c index 95ac3407e..4923c6558 100644 --- a/libs/util/tga.c +++ b/libs/util/tga.c @@ -40,10 +40,10 @@ static const char rcsid[] = #include #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/texture.h" #include "QF/tga.h" -#include "QF/vfs.h" #include "QF/zone.h" #include "compat.h" @@ -115,7 +115,7 @@ read_rgba (byte *buf, int count, byte **data) } struct tex_s * -LoadTGA (VFile *fin) +LoadTGA (QFile *fin) { byte *dataByte, *pixcol, *pixrow; int column, row, columns, rows, numPixels, span, targa_mark; diff --git a/libs/util/wad.c b/libs/util/wad.c index e04fb450d..50616a6d6 100644 --- a/libs/util/wad.c +++ b/libs/util/wad.c @@ -39,9 +39,9 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/wad.h" -#include "QF/vfs.h" int wad_numlumps; lumpinfo_t *wad_lumps; diff --git a/libs/video/renderer/gl/gl_draw.c b/libs/video/renderer/gl/gl_draw.c index 5fa27e889..7e9c42eb0 100644 --- a/libs/video/renderer/gl/gl_draw.c +++ b/libs/video/renderer/gl/gl_draw.c @@ -43,13 +43,13 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/texture.h" #include "QF/tga.h" #include "QF/va.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/GL/defines.h" #include "QF/GL/funcs.h" @@ -160,7 +160,7 @@ Draw_PicFromWad (const char *name) glpic_t *gl; qpic_t *p; char filename[MAX_QPATH + 4]; - VFile *f; + QFile *f; tex_t *targa; p = W_GetLumpName (name); @@ -202,7 +202,7 @@ Draw_CachePic (const char *path, qboolean alpha) glpic_t *gl; qpic_t *dat; char filename[MAX_QPATH + 4]; - VFile *f; + QFile *f; tex_t *targa; // First, check if its cached.. diff --git a/libs/video/renderer/gl/gl_dyn_part.c b/libs/video/renderer/gl/gl_dyn_part.c index d0a8f14bc..0df8a4939 100644 --- a/libs/video/renderer/gl/gl_dyn_part.c +++ b/libs/video/renderer/gl/gl_dyn_part.c @@ -43,9 +43,9 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "QF/GL/defines.h" #include "QF/GL/funcs.h" #include "QF/GL/qf_explosions.h" @@ -160,7 +160,7 @@ R_ReadPointFile_f (void) char name[MAX_OSPATH], *mapname, *t1; int c, r; vec3_t org; - VFile *f; + QFile *f; mapname = strdup (r_worldentity.model->name); if (!mapname) diff --git a/libs/video/renderer/gl/gl_rmisc.c b/libs/video/renderer/gl/gl_rmisc.c index f25461207..1f587eef7 100644 --- a/libs/video/renderer/gl/gl_rmisc.c +++ b/libs/video/renderer/gl/gl_rmisc.c @@ -43,10 +43,10 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/skin.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/GL/defines.h" #include "QF/GL/funcs.h" diff --git a/libs/video/renderer/gl/gl_screen.c b/libs/video/renderer/gl/gl_screen.c index 8572572b5..d71479725 100644 --- a/libs/video/renderer/gl/gl_screen.c +++ b/libs/video/renderer/gl/gl_screen.c @@ -45,12 +45,12 @@ static const char rcsid[] = #include "QF/draw.h" #include "QF/keys.h" #include "QF/pcx.h" +#include "QF/quakefs.h" // MAX_OSPATH #include "QF/render.h" // r_refdef #include "QF/screen.h" #include "QF/sys.h" #include "QF/texture.h" #include "QF/tga.h" -#include "QF/vfs.h" // MAX_OSPATH #include "QF/GL/defines.h" #include "QF/GL/funcs.h" #include "QF/GL/qf_rmain.h" diff --git a/libs/video/renderer/gl/gl_sky.c b/libs/video/renderer/gl/gl_sky.c index 958dc5130..384d9b9eb 100644 --- a/libs/video/renderer/gl/gl_sky.c +++ b/libs/video/renderer/gl/gl_sky.c @@ -39,10 +39,10 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/texture.h" #include "QF/tga.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/GL/defines.h" #include "QF/GL/funcs.h" @@ -69,7 +69,7 @@ R_LoadSkys (const char *skyname) { char name[64]; int i; - VFile *f; + QFile *f; if (strcasecmp (skyname, "none") == 0) { skyloaded = false; diff --git a/libs/video/renderer/sw/draw.c b/libs/video/renderer/sw/draw.c index 7112321ac..d1b7fb935 100644 --- a/libs/video/renderer/sw/draw.c +++ b/libs/video/renderer/sw/draw.c @@ -40,9 +40,9 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" +#include "QF/quakefs.h" #include "QF/sound.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "d_iface.h" #include "r_cvar.h" diff --git a/libs/video/renderer/sw/screen.c b/libs/video/renderer/sw/screen.c index 4c9a7ac14..e00887255 100644 --- a/libs/video/renderer/sw/screen.c +++ b/libs/video/renderer/sw/screen.c @@ -45,11 +45,11 @@ static const char rcsid[] = #include "QF/draw.h" #include "QF/keys.h" #include "QF/pcx.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/texture.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "compat.h" diff --git a/libs/video/renderer/sw/sw_rpart.c b/libs/video/renderer/sw/sw_rpart.c index 40b01707e..ef452cbdb 100644 --- a/libs/video/renderer/sw/sw_rpart.c +++ b/libs/video/renderer/sw/sw_rpart.c @@ -36,8 +36,8 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" +#include "QF/quakefs.h" #include "QF/render.h" -#include "QF/vfs.h" #include "compat.h" #include "r_cvar.h" @@ -71,7 +71,7 @@ R_ClearParticles (void) void R_ReadPointFile_f (void) { - VFile *f; + QFile *f; vec3_t org; int r; int c; diff --git a/libs/video/renderer/sw32/draw.c b/libs/video/renderer/sw32/draw.c index 0fcc1fdb7..d0e1a6a96 100644 --- a/libs/video/renderer/sw32/draw.c +++ b/libs/video/renderer/sw32/draw.c @@ -40,9 +40,9 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" +#include "QF/quakefs.h" #include "QF/sound.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "d_iface.h" #include "r_cvar.h" diff --git a/libs/video/renderer/sw32/screen.c b/libs/video/renderer/sw32/screen.c index d7628c12e..c255b4cde 100644 --- a/libs/video/renderer/sw32/screen.c +++ b/libs/video/renderer/sw32/screen.c @@ -45,11 +45,11 @@ static const char rcsid[] = #include "QF/draw.h" #include "QF/keys.h" #include "QF/pcx.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/texture.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "compat.h" diff --git a/libs/video/renderer/sw32/sw32_rpart.c b/libs/video/renderer/sw32/sw32_rpart.c index 91609c648..41bc930a6 100644 --- a/libs/video/renderer/sw32/sw32_rpart.c +++ b/libs/video/renderer/sw32/sw32_rpart.c @@ -36,7 +36,7 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" #include "QF/render.h" #include "compat.h" @@ -71,7 +71,7 @@ R_ClearParticles (void) void R_ReadPointFile_f (void) { - VFile *f; + QFile *f; vec3_t org; int r; int c; diff --git a/libs/video/targets/keys.c b/libs/video/targets/keys.c index 83e61bc51..768260f24 100644 --- a/libs/video/targets/keys.c +++ b/libs/video/targets/keys.c @@ -705,7 +705,7 @@ Key_InputMappingTable_f (void) Writes lines containing "bind key value" */ void -Key_WriteBindings (VFile *f) +Key_WriteBindings (QFile *f) { int i, j; const char *bind; diff --git a/libs/video/targets/vid_common_gl.c b/libs/video/targets/vid_common_gl.c index 9f7f1af61..3793c85a8 100644 --- a/libs/video/targets/vid_common_gl.c +++ b/libs/video/targets/vid_common_gl.c @@ -45,8 +45,8 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/input.h" #include "QF/qargs.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/GL/defines.h" #include "QF/GL/extensions.h" @@ -175,7 +175,7 @@ VID_SetPalette (unsigned char *palette) unsigned short i; unsigned int *table; static qboolean palflag = false; - VFile *f; + QFile *f; // 8 8 8 encoding // Con_Printf("Converting 8to24\n"); diff --git a/libs/video/targets/vid_wgl.c b/libs/video/targets/vid_wgl.c index ec03bbb92..911c8aae9 100644 --- a/libs/video/targets/vid_wgl.c +++ b/libs/video/targets/vid_wgl.c @@ -41,11 +41,11 @@ static const char rcsid[] = #include "QF/keys.h" #include "QF/qargs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/screen.h" #include "QF/sound.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/GL/funcs.h" diff --git a/nq/include/client.h b/nq/include/client.h index 5bd6b2d37..63d3226df 100644 --- a/nq/include/client.h +++ b/nq/include/client.h @@ -34,8 +34,8 @@ #include "QF/input.h" #include "QF/mathlib.h" #include "QF/model.h" +#include "QF/quakefs.h" #include "QF/sound.h" -#include "QF/vfs.h" #include "QF/render.h" #include "game.h" @@ -107,7 +107,7 @@ typedef struct char spawnparms[MAX_MAPSTRING]; // to restart a level // file transfer from server - VFile *download; + QFile *download; char downloadtempname[MAX_OSPATH]; char downloadname[MAX_OSPATH]; int downloadnumber; @@ -124,7 +124,7 @@ typedef struct qboolean demoplayback; qboolean timedemo; int forcetrack; // -1 = use normal cd track - VFile *demofile; + QFile *demofile; int td_lastframe; // to meter out one message a frame int td_startframe; // host_framecount at start float td_starttime; // realtime at second frame of timedemo diff --git a/nq/include/net.h b/nq/include/net.h index 69d2ec9c8..a874e0669 100644 --- a/nq/include/net.h +++ b/nq/include/net.h @@ -30,8 +30,8 @@ #define __net_h #include "QF/gcc_attr.h" +#include "QF/quakeio.h" #include "QF/sizebuf.h" -#include "QF/vfile.h" struct qsockaddr { @@ -340,6 +340,6 @@ extern struct cvar_s *config_modem_init; extern struct cvar_s *config_modem_hangup; extern struct cvar_s *hostname; -extern VFile *vcrFile; +extern QFile *vcrFile; #endif // __net_h diff --git a/nq/include/server.h b/nq/include/server.h index 477228179..c7259f50e 100644 --- a/nq/include/server.h +++ b/nq/include/server.h @@ -32,10 +32,10 @@ #include #include "QF/gcc_attr.h" -#include "QF/model.h" -#include "QF/sizebuf.h" #include "QF/info.h" -#include "QF/vfile.h" +#include "QF/model.h" +#include "QF/quakeio.h" +#include "QF/sizebuf.h" #include "client.h" #include "net.h" diff --git a/nq/source/com.c b/nq/source/com.c index 3e9251117..847861a5e 100644 --- a/nq/source/com.c +++ b/nq/source/com.c @@ -35,7 +35,7 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" #include "game.h" @@ -58,7 +58,7 @@ void COM_CheckRegistered (void) { unsigned short check[128]; - VFile *h; + QFile *h; COM_FOpenFile ("gfx/pop.lmp", &h); static_registered = 0; diff --git a/nq/source/game.c b/nq/source/game.c index f44f6a9da..f884a4a42 100644 --- a/nq/source/game.c +++ b/nq/source/game.c @@ -34,7 +34,7 @@ static const char rcsid[] = #endif #include "QF/qargs.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" #include "game.h" diff --git a/nq/source/host.c b/nq/source/host.c index 16e1b52e8..02a0d333b 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -280,7 +280,7 @@ Host_InitLocal (void) void Host_WriteConfiguration (void) { - VFile *f; + QFile *f; // dedicated servers initialize the host but don't parse and set the // config.cfg cvars @@ -796,7 +796,7 @@ check_quakerc (void) { const char *l, *p; int ret = 1; - VFile *f; + QFile *f; COM_FOpenFile ("quake.rc", &f); if (!f) diff --git a/nq/source/host_cmd.c b/nq/source/host_cmd.c index c9bd4bd8c..4453ced01 100644 --- a/nq/source/host_cmd.c +++ b/nq/source/host_cmd.c @@ -397,7 +397,7 @@ void Host_Savegame_f (void) { char name[256]; - VFile *f; + QFile *f; int i; char comment[SAVEGAME_COMMENT_LENGTH + 1]; @@ -478,7 +478,7 @@ void Host_Loadgame_f (void) { char name[MAX_OSPATH]; - VFile *f; + QFile *f; char mapname[MAX_QPATH]; float time, tfloat; char str[32768]; diff --git a/nq/source/locs.c b/nq/source/locs.c index 6cbf6a914..384288aae 100644 --- a/nq/source/locs.c +++ b/nq/source/locs.c @@ -47,8 +47,8 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/locs.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "client.h" @@ -114,7 +114,7 @@ locs_add (const vec3_t location, const char *name) void locs_load (const char *filename) { - VFile *file; + QFile *file; const char *line; char *t1, *t2; vec3_t loc; @@ -195,7 +195,7 @@ locs_more (void) void locs_save (const char *filename, qboolean gz) { - VFile *locfd; + QFile *locfd; int i; char locfile[MAX_OSPATH]; diff --git a/nq/source/net_main.c b/nq/source/net_main.c index 50ce15912..eb74e7c18 100644 --- a/nq/source/net_main.c +++ b/nq/source/net_main.c @@ -43,9 +43,9 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/msg.h" #include "QF/qargs.h" +#include "QF/quakeio.h" #include "QF/sizebuf.h" #include "QF/sys.h" -#include "QF/vfile.h" #include "host.h" #include "net.h" @@ -112,7 +112,7 @@ cvar_t *config_modem_clear; cvar_t *config_modem_init; cvar_t *config_modem_hangup; -VFile *vcrFile; +QFile *vcrFile; qboolean recording = false; // these two macros are to make the code more readable diff --git a/nq/source/skin.c b/nq/source/skin.c index 99556ae42..4ac6eabe0 100644 --- a/nq/source/skin.c +++ b/nq/source/skin.c @@ -42,10 +42,10 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/hash.h" #include "QF/pcx.h" +#include "QF/quakefs.h" #include "QF/skin.h" #include "QF/sys.h" #include "QF/texture.h" -#include "QF/vfs.h" #include "client.h" @@ -135,7 +135,7 @@ Skin_Cache (skin_t *skin) { char name[1024]; tex_t *out; - VFile *file; + QFile *file; tex_t *tex; int pixels; byte *ipix, *opix; diff --git a/nq/source/sv_ded.c b/nq/source/sv_ded.c index e593a0d9b..3697d0320 100644 --- a/nq/source/sv_ded.c +++ b/nq/source/sv_ded.c @@ -229,7 +229,7 @@ Key_Init_Cvars (void) } void -Key_WriteBindings (VFile *f) +Key_WriteBindings (QFile *f) { } diff --git a/nq/source/sys_win.c b/nq/source/sys_win.c index 0d9c8859f..7d486c27e 100644 --- a/nq/source/sys_win.c +++ b/nq/source/sys_win.c @@ -38,9 +38,9 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" +#include "QF/quakeio.h" #include "QF/screen.h" #include "QF/sys.h" -#include "QF/vfile.h" #include "client.h" #include "compat.h" @@ -73,7 +73,7 @@ static HANDLE heventChild; // FILE IO ==================================================================== #define MAX_HANDLES 10 -VFile *sys_handles[MAX_HANDLES]; +QFile *sys_handles[MAX_HANDLES]; int findhandle (void) diff --git a/qw/include/client.h b/qw/include/client.h index b833de6b5..0f6c30838 100644 --- a/qw/include/client.h +++ b/qw/include/client.h @@ -30,7 +30,7 @@ #define _CLIENT_H #include "QF/info.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" #include "QF/vid.h" #include "QF/zone.h" @@ -162,7 +162,7 @@ typedef struct int qport; // file transfer from server - VFile *download; + QFile *download; char downloadtempname[MAX_OSPATH]; char downloadname[MAX_OSPATH]; int downloadnumber; @@ -178,7 +178,7 @@ typedef struct qboolean demorecording; qboolean demoplayback; qboolean timedemo; - VFile *demofile; + QFile *demofile; float td_lastframe; // to meter out one message a frame int td_startframe; // host_framecount at start float td_starttime; // realtime at second frame of timedemo diff --git a/qw/include/server.h b/qw/include/server.h index 87bd46612..8aaa254d1 100644 --- a/qw/include/server.h +++ b/qw/include/server.h @@ -33,10 +33,10 @@ #include #include "QF/gcc_attr.h" -#include "QF/model.h" -#include "QF/sizebuf.h" #include "QF/info.h" -#include "QF/vfile.h" +#include "QF/model.h" +#include "QF/quakeio.h" +#include "QF/sizebuf.h" #include "host.h" #include "net.h" @@ -201,7 +201,7 @@ typedef struct client_s client_frame_t frames[UPDATE_BACKUP]; // updates can be deltad from here - VFile *download; // file being downloaded + QFile *download; // file being downloaded int downloadsize; // total bytes int downloadcount; // bytes sent @@ -213,7 +213,7 @@ typedef struct client_s qboolean upgradewarn; // did we warn him? - VFile *upload; + QFile *upload; char uploadfn[MAX_QPATH]; netadr_t snap_from; qboolean remote_snap; @@ -410,8 +410,8 @@ extern char localmodels[MAX_MODELS][5]; // inline model names for precache extern struct info_s *localinfo; extern int host_hunklevel; -extern VFile *sv_logfile; -extern VFile *sv_fraglogfile; +extern QFile *sv_logfile; +extern QFile *sv_fraglogfile; extern double sv_frametime; extern double realtime; diff --git a/qw/source/cl_demo.c b/qw/source/cl_demo.c index 03386e76c..6f627d8ad 100644 --- a/qw/source/cl_demo.c +++ b/qw/source/cl_demo.c @@ -970,7 +970,7 @@ void CL_TimeFrames_DumpLog (void) char *filename = "timeframes.txt"; int i; long frame; - VFile *outputfile; + QFile *outputfile; if (cl_timeframes_isactive == 0) return; diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 37904bcfd..e661cb90c 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -72,12 +72,12 @@ static const char rcsid[] = #include "QF/progs.h" #include "QF/qargs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/screen.h" #include "QF/sound.h" #include "QF/sys.h" #include "QF/teamplay.h" #include "QF/va.h" -#include "QF/vfs.h" #include "QF/vid.h" #include "QF/gib_thread.h" @@ -1438,7 +1438,7 @@ Host_Error (const char *error, ...) void Host_WriteConfiguration (void) { - VFile *f; + QFile *f; if (host_initialized && cl_writecfg->int_val) { char *path = va ("%s/config.cfg", com_gamedir); @@ -1612,7 +1612,7 @@ check_quakerc (void) { const char *l, *p; int ret = 1; - VFile *f; + QFile *f; COM_FOpenFile ("quake.rc", &f); if (!f) diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index 394314529..d6ec94ad0 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -50,11 +50,11 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/hash.h" #include "QF/msg.h" +#include "QF/quakeio.h" #include "QF/screen.h" #include "QF/sound.h" #include "QF/teamplay.h" #include "QF/va.h" -#include "QF/vfile.h" #include "QF/dstring.h" #include "QF/gib_vars.h" #include "QF/gib_thread.h" @@ -206,7 +206,7 @@ CL_CalcNet (void) qboolean CL_CheckOrDownloadFile (const char *filename) { - VFile *f; + QFile *f; if (strstr (filename, "..")) { Con_Printf ("Refusing to download a path with ..\n"); diff --git a/qw/source/cl_slist.c b/qw/source/cl_slist.c index a29672ffd..e15139572 100644 --- a/qw/source/cl_slist.c +++ b/qw/source/cl_slist.c @@ -66,9 +66,9 @@ static const char rcsid[] = #include "QF/cmd.h" #include "QF/console.h" #include "QF/cvar.h" +#include "QF/quakeio.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfile.h" #include "bothdefs.h" #include "cl_main.h" @@ -295,7 +295,7 @@ SL_Del_All (server_entry_t *start) } void -SL_SaveF (VFile *f, server_entry_t *start) +SL_SaveF (QFile *f, server_entry_t *start) { do { Qprintf (f, "%s %s\n", start->server, start->desc); @@ -308,7 +308,7 @@ void SL_Shutdown (void) { char e_path[MAX_OSPATH]; - VFile *f; + QFile *f; if (fav_slist) { Qexpand_squiggle (fs_userpath->string, e_path); @@ -610,7 +610,7 @@ MSL_ParseServerList(const char *msl_data) } server_entry_t * -SL_LoadF (VFile *f, server_entry_t *start) +SL_LoadF (QFile *f, server_entry_t *start) { //This could get messy char line[256]; /* Long lines get truncated. */ @@ -651,7 +651,7 @@ SL_LoadF (VFile *f, server_entry_t *start) void SL_Init (void) { char e_path[MAX_OSPATH]; - VFile *servlist; + QFile *servlist; Qexpand_squiggle (fs_userpath->string, e_path); if ((servlist = Qopen (va ("%s/servers.txt", e_path), "r"))) { diff --git a/qw/source/com.c b/qw/source/com.c index 1f1b59352..cdb7fe119 100644 --- a/qw/source/com.c +++ b/qw/source/com.c @@ -36,8 +36,8 @@ static const char rcsid[] = #include "QF/cmd.h" #include "QF/console.h" #include "QF/cvar.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" cvar_t *registered; @@ -61,7 +61,7 @@ void COM_CheckRegistered (void) { unsigned short check[128]; - VFile *h; + QFile *h; COM_FOpenFile ("gfx/pop.lmp", &h); static_registered = 0; diff --git a/qw/source/crudefile.c b/qw/source/crudefile.c index 12a02ae03..48ad32183 100644 --- a/qw/source/crudefile.c +++ b/qw/source/crudefile.c @@ -47,7 +47,7 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/sys.h" #include "QF/cvar.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" #include "QF/zone.h" #include "compat.h" @@ -57,7 +57,7 @@ int cf_maxsize; // max combined file size (eg quota) int cf_cursize; // current combined file size typedef struct cf_file_s { - VFile *file; + QFile *file; char *path; char *buf; int size; @@ -208,7 +208,7 @@ CF_Open (const char *path, const char *mode) { char *fullpath, *j; int desc, oldsize, i; - VFile *file; + QFile *file; if (cf_openfiles >= CF_MAXFILES) { return -1; diff --git a/qw/source/game.c b/qw/source/game.c index 52318b725..ff9ea6f87 100644 --- a/qw/source/game.c +++ b/qw/source/game.c @@ -44,7 +44,7 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/info.h" #include "QF/qargs.h" -#include "QF/vfs.h" +#include "QF/quakefs.h" #include "game.h" #include "server.h" diff --git a/qw/source/locs.c b/qw/source/locs.c index 9335b7a9f..9f6bf682b 100644 --- a/qw/source/locs.c +++ b/qw/source/locs.c @@ -46,8 +46,8 @@ static const char rcsid[] = #include "QF/console.h" #include "QF/locs.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfs.h" #include "client.h" #include "compat.h" @@ -120,7 +120,7 @@ locs_load (const char *filename) const char *line; int templength = 0; vec3_t loc; - VFile *file; + QFile *file; snprintf(tmp,sizeof(tmp), "maps/%s",filename); templength = _COM_FOpenFile (tmp, &file, foundname, 1); @@ -197,7 +197,7 @@ locs_save (const char *filename, qboolean gz) { char locfile[MAX_OSPATH]; int i; - VFile *locfd; + QFile *locfd; if (gz) { if (strncmp(filename + strlen(filename) - 3,".gz",3) != 0) diff --git a/qw/source/net_packetlog.c b/qw/source/net_packetlog.c index 4895e9cb3..f53ba906d 100644 --- a/qw/source/net_packetlog.c +++ b/qw/source/net_packetlog.c @@ -51,8 +51,8 @@ static const char rcsid[] = #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/msg.h" +#include "QF/quakefs.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" #include "net.h" @@ -169,8 +169,8 @@ const char *clc_string[] = { #define svc_particle 18 // [vec3] #define svc_signonnum 25 // [byte] used for the signon // sequence -static VFile *_stdout; -static VFile *Net_PacketLog; +static QFile *_stdout; +static QFile *Net_PacketLog; static const char **Net_sound_precache; static sizebuf_t _packet; static msg_t packet = {0, 0, &_packet}; diff --git a/qw/source/sbar.c b/qw/source/sbar.c index f77d1d08c..e4c03b800 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -45,10 +45,10 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/draw.h" #include "QF/msg.h" +#include "QF/quakefs.h" #include "QF/screen.h" #include "QF/va.h" #include "QF/vid.h" -#include "QF/vfs.h" #include "QF/sys.h" #include "bothdefs.h" @@ -920,7 +920,7 @@ Sbar_LogFrags (void) char conv[512]; char conv2[512]; char *cp = NULL; - VFile *file = NULL; + QFile *file = NULL; int minutes, fph, total, f, i, k, l, p, d; player_info_t *s = NULL; const char *t = NULL; diff --git a/qw/source/skin.c b/qw/source/skin.c index af0e27047..48b224bd5 100644 --- a/qw/source/skin.c +++ b/qw/source/skin.c @@ -41,10 +41,10 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/hash.h" #include "QF/pcx.h" +#include "QF/quakefs.h" #include "QF/skin.h" #include "QF/sys.h" #include "QF/texture.h" -#include "QF/vfs.h" #include "client.h" #include "compat.h" @@ -140,7 +140,7 @@ Skin_Cache (skin_t *skin) { char name[1024]; tex_t *out; - VFile *file; + QFile *file; tex_t *tex; int pixels; byte *ipix, *opix; diff --git a/qw/source/sv_ccmds.c b/qw/source/sv_ccmds.c index 327fe6ff0..b6ab34508 100644 --- a/qw/source/sv_ccmds.c +++ b/qw/source/sv_ccmds.c @@ -46,9 +46,9 @@ static const char rcsid[] = #include "QF/msg.h" #include "QF/qargs.h" #include "QF/qendian.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "bothdefs.h" #include "compat.h" @@ -355,7 +355,7 @@ SV_Map_f (void) { char level[MAX_QPATH]; char expanded[MAX_QPATH]; - VFile *f; + QFile *f; if (Cmd_Argc () > 2) { SV_Printf ("map : continue game on a new level\n"); diff --git a/qw/source/sv_init.c b/qw/source/sv_init.c index c05326777..74479171b 100644 --- a/qw/source/sv_init.c +++ b/qw/source/sv_init.c @@ -41,9 +41,9 @@ static const char rcsid[] = #include "QF/cvar.h" #include "QF/info.h" #include "QF/msg.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "compat.h" #include "crudefile.h" diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index d9970d0bf..d1dca3010 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -72,10 +72,10 @@ static const char rcsid[] = #include "QF/msg.h" #include "QF/plugin.h" #include "QF/qargs.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" #include "QF/ver_check.h" -#include "QF/vfs.h" #include "QF/zone.h" #include "bothdefs.h" @@ -181,7 +181,7 @@ cvar_t *watervis; cvar_t *hostname; -VFile *sv_fraglogfile; +QFile *sv_fraglogfile; cvar_t *pr_gc; cvar_t *pr_gc_interval; @@ -1491,7 +1491,7 @@ SV_WriteIP_f (void) { char name[MAX_OSPATH]; int i; - VFile *f; + QFile *f; char *type; snprintf (name, sizeof (name), "%s/listip.cfg", com_gamedir); diff --git a/qw/source/sv_user.c b/qw/source/sv_user.c index 1c5f457a4..53c655ce9 100644 --- a/qw/source/sv_user.c +++ b/qw/source/sv_user.c @@ -51,9 +51,9 @@ static const char rcsid[] = #include "QF/dstring.h" #include "QF/hash.h" #include "QF/msg.h" +#include "QF/quakefs.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfs.h" #include "bothdefs.h" #include "compat.h" @@ -661,7 +661,7 @@ SV_BeginDownload_f (ucmd_t *cmd) const char *name; char realname[MAX_OSPATH]; int size, zip; - VFile *file; + QFile *file; name = Cmd_Argv (1); // hacked by zoid to allow more conrol over download diff --git a/tools/qfcc/include/obj_file.h b/tools/qfcc/include/obj_file.h index 6465ee4ea..01a52c028 100644 --- a/tools/qfcc/include/obj_file.h +++ b/tools/qfcc/include/obj_file.h @@ -34,7 +34,7 @@ #include "QF/pr_comp.h" #include "QF/pr_debug.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" #define QFO "QFO" #define QFO_VERSION 0x00001004 // MMmmmRRR 0.001.004 (hex) @@ -140,7 +140,7 @@ struct pr_info_s; qfo_t *qfo_from_progs (struct pr_info_s *pr); int qfo_write (qfo_t *qfo, const char *filename); -qfo_t *qfo_read (VFile *file); +qfo_t *qfo_read (QFile *file); qfo_t *qfo_open (const char *filename); int qfo_to_progs (qfo_t *qfo, struct pr_info_s *pr); diff --git a/tools/qfcc/source/linker.c b/tools/qfcc/source/linker.c index 6a6a3e50c..23d1e744e 100644 --- a/tools/qfcc/source/linker.c +++ b/tools/qfcc/source/linker.c @@ -597,7 +597,7 @@ linker_add_lib (const char *libname) did_something = 0; for (i = 0; i < pack->numfiles; i++) { int fd; - VFile *f; + QFile *f; qfo_t *qfo; fd = open (libname, O_RDONLY); diff --git a/tools/qfcc/source/obj_file.c b/tools/qfcc/source/obj_file.c index ca96f6fe8..124537ecc 100644 --- a/tools/qfcc/source/obj_file.c +++ b/tools/qfcc/source/obj_file.c @@ -43,7 +43,7 @@ static const char rcsid[] = #include "QF/dstring.h" #include "QF/qendian.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" #include "debug.h" #include "def.h" @@ -282,7 +282,7 @@ int qfo_write (qfo_t *qfo, const char *filename) { qfo_header_t hdr; - VFile *file; + QFile *file; file = Qopen (filename, "wbz9"); @@ -327,7 +327,7 @@ qfo_write (qfo_t *qfo, const char *filename) } qfo_t * -qfo_read (VFile *file) +qfo_read (QFile *file) { qfo_header_t hdr; qfo_t *qfo; @@ -461,7 +461,7 @@ qfo_read (VFile *file) qfo_t *qfo_open (const char *filename) { qfo_t *qfo; - VFile *file; + QFile *file; file = Qopen (filename, "rbz"); if (!file) { diff --git a/tools/qfcc/source/qfodump.c b/tools/qfcc/source/qfodump.c index d941aa4a2..5e5c92eb2 100644 --- a/tools/qfcc/source/qfodump.c +++ b/tools/qfcc/source/qfodump.c @@ -44,7 +44,7 @@ static const char rcsid[] = #include #include "QF/dstring.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" #include "class.h" #include "def.h" diff --git a/tools/qfdefs/source/qfdefs.c b/tools/qfdefs/source/qfdefs.c index 004cc3591..f10d4d78b 100644 --- a/tools/qfdefs/source/qfdefs.c +++ b/tools/qfdefs/source/qfdefs.c @@ -40,7 +40,7 @@ static const char rcsid[] = #include #include #include "QF/progs.h" -#include +#include #include #include #include @@ -80,7 +80,7 @@ main (int argc, char **argv) while (--argc) { int fix = 0; int size; - VFile *file; + QFile *file; progs.progs_name = *++argv; size = COM_FOpenFile (progs.progs_name, &file); diff --git a/tools/qflight/source/entities.c b/tools/qflight/source/entities.c index f1af33ee0..e9bead612 100644 --- a/tools/qflight/source/entities.c +++ b/tools/qflight/source/entities.c @@ -50,9 +50,8 @@ static const char rcsid[] = #include "QF/idparse.h" #include "QF/mathlib.h" #include "QF/qtypes.h" +#include "QF/quakefs.h" #include "QF/sys.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "light.h" #include "threads.h" diff --git a/tools/qflight/source/ltface.c b/tools/qflight/source/ltface.c index aa6ec8bc3..2833269b3 100644 --- a/tools/qflight/source/ltface.c +++ b/tools/qflight/source/ltface.c @@ -44,13 +44,13 @@ static const char rcsid[] = #endif #include -#include "QF/qtypes.h" -#include "QF/sys.h" -#include "QF/dstring.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "QF/bspfile.h" +#include "QF/dstring.h" #include "QF/mathlib.h" +#include "QF/qtypes.h" +#include "QF/quakefs.h" +#include "QF/sys.h" + #include "light.h" #include "entities.h" #include "options.h" diff --git a/tools/qflight/source/qflight.c b/tools/qflight/source/qflight.c index 6125f04e8..376e0bba9 100644 --- a/tools/qflight/source/qflight.c +++ b/tools/qflight/source/qflight.c @@ -47,13 +47,13 @@ static const char rcsid[] = #include #include -#include "QF/qtypes.h" -#include "QF/sys.h" -#include "QF/dstring.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "QF/bspfile.h" +#include "QF/dstring.h" #include "QF/mathlib.h" +#include "QF/qtypes.h" +#include "QF/quakefs.h" +#include "QF/sys.h" + #include "light.h" #include "threads.h" #include "entities.h" diff --git a/tools/qflight/source/trace.c b/tools/qflight/source/trace.c index 4d13d7e97..30869e481 100644 --- a/tools/qflight/source/trace.c +++ b/tools/qflight/source/trace.c @@ -45,13 +45,12 @@ static const char rcsid[] = #endif #include -#include "QF/qtypes.h" -#include "QF/sys.h" -#include "QF/dstring.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "QF/bspfile.h" #include "QF/mathlib.h" +#include "QF/qtypes.h" +#include "QF/dstring.h" +#include "QF/quakefs.h" +#include "QF/sys.h" #include "light.h" typedef struct { diff --git a/tools/qfprogs/source/disassemble.c b/tools/qfprogs/source/disassemble.c index 6be873f93..e655cfabf 100644 --- a/tools/qfprogs/source/disassemble.c +++ b/tools/qfprogs/source/disassemble.c @@ -48,11 +48,11 @@ static const char rcsid[] = #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/progs.h" +#include "QF/quakeio.h" #include "QF/sys.h" -#include "QF/vfile.h" #include "QF/zone.h" -#include "QF/vfile.h" +#include "QF/quakeio.h" #include "qfprogs.h" #include "disassemble.h" diff --git a/tools/qfprogs/source/qfprogs.c b/tools/qfprogs/source/qfprogs.c index 594af865e..0c3fbf77d 100644 --- a/tools/qfprogs/source/qfprogs.c +++ b/tools/qfprogs/source/qfprogs.c @@ -53,9 +53,9 @@ static const char rcsid[] = #include "QF/hash.h" #include "QF/pr_comp.h" #include "QF/progs.h" +#include "QF/quakeio.h" #include "QF/sys.h" #include "QF/va.h" -#include "QF/vfile.h" #include "QF/zone.h" #include "disassemble.h" @@ -82,7 +82,7 @@ static int memsize = 1024*1024; static hashtab_t *func_tab; -static VFile * +static QFile * open_file (const char *path, int *len) { int fd = open (path, O_RDONLY); @@ -112,7 +112,7 @@ open_file (const char *path, int *len) static void * load_file (progs_t *pr, const char *name) { - VFile *file; + QFile *file; int size; void *sym; @@ -192,7 +192,7 @@ init_qf (void) int load_progs (const char *name) { - VFile *file; + QFile *file; int i, size; file = open_file (name, &size); diff --git a/tools/qfvis/source/flow.c b/tools/qfvis/source/flow.c index 37098e14a..6154da81c 100644 --- a/tools/qfvis/source/flow.c +++ b/tools/qfvis/source/flow.c @@ -50,12 +50,12 @@ static const char rcsid[] = #include #include -#include "QF/cmd.h" -#include "QF/sys.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "QF/bspfile.h" +#include "QF/cmd.h" #include "QF/mathlib.h" +#include "QF/quakefs.h" +#include "QF/sys.h" + #include "vis.h" #include "options.h" diff --git a/tools/qfvis/source/qfvis.c b/tools/qfvis/source/qfvis.c index ff37b2bfe..41b4b8240 100644 --- a/tools/qfvis/source/qfvis.c +++ b/tools/qfvis/source/qfvis.c @@ -47,14 +47,14 @@ static const char rcsid[] = #include #include -#include "QF/qtypes.h" #include "QF/cmd.h" -#include "QF/sys.h" -#include "QF/dstring.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "QF/bspfile.h" +#include "QF/dstring.h" #include "QF/mathlib.h" +#include "QF/qtypes.h" +#include "QF/quakefs.h" +#include "QF/sys.h" + #include "vis.h" #include "options.h" diff --git a/tools/qfvis/source/soundphs.c b/tools/qfvis/source/soundphs.c index 51ece505b..9be7db654 100644 --- a/tools/qfvis/source/soundphs.c +++ b/tools/qfvis/source/soundphs.c @@ -50,12 +50,12 @@ static const char rcsid[] = #include #include -#include "QF/cmd.h" -#include "QF/sys.h" -#include "QF/vfile.h" -#include "QF/vfs.h" #include "QF/bspfile.h" +#include "QF/cmd.h" #include "QF/mathlib.h" +#include "QF/quakefs.h" +#include "QF/sys.h" + #include "vis.h" /* diff --git a/tools/qwaq/main.c b/tools/qwaq/main.c index 7a2a45b26..a3c477921 100644 --- a/tools/qwaq/main.c +++ b/tools/qwaq/main.c @@ -35,7 +35,7 @@ static const char rcsid[] = #include #include #include -#include +#include #include #include @@ -57,7 +57,7 @@ int main () { func_t main_func; - VFile *f; + QFile *f; int len; Cvar_Init_Hash ();