2 Copyright (C) 1998 BJ Eirich (aka vecna)
\r
3 This program is free software; you can redistribute it and/or
\r
4 modify it under the terms of the GNU General Public License
\r
5 as published by the Free Software Foundation; either version 2
\r
6 of the License, or (at your option) any later version.
\r
7 This program is distributed in the hope that it will be useful,
\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\r
10 See the GNU General Public Lic
\r
11 See the GNU General Public License for more details.
\r
12 You should have received a copy of the GNU General Public License
\r
13 along with this program; if not, write to the Free Software
\r
14 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
\r
20 #define vscanf _vscanf
\r
24 FILE *fp; // real file pointer.
\r
25 byte s; // 0=real file 1=vfile;
\r
26 byte v; // if vfile, which vfile index
\r
27 byte i; // which file index in vfile is it?
\r
28 byte p; // data alignment pad. :)
\r
33 unsigned char fname[84]; // pathname thingo
\r
34 int size; // size of the file
\r
35 int packofs; // where the file can be found in PACK
\r
36 int curofs; // current file offset.
\r
37 char extractable; // irrelevant to runtime, but...
\r
38 char override; // should we override?
\r
43 char mountname[80]; // name of VRG packfile.
\r
44 FILE *vhandle; // Real file-handle of packfile.
\r
45 struct filestruct *files; // File record array.
\r
46 int numfiles; // number of files in pack.
\r
47 int curofs; // Current filepointer.
\r
50 extern struct mountstruct pack[3];
\r
51 extern char filesmounted;
\r
53 int Exist(char *fname);
\r
54 VFILE *vopen(char *fname);
\r
55 void MountVFile(char *fname);
\r
56 void vread(void *dest, int len, VFILE *f);
\r
57 void vclose(VFILE *f);
\r
58 int filesize(VFILE *f);
\r
59 int vtell(VFILE *f);
\r
60 void vseek(VFILE *f, int offset, int origin);
\r
61 void vscanf(VFILE *f, char *format, char *dest);
\r
62 char vgetc(VFILE *f);
\r
63 word vgetw(VFILE *f);
\r
64 void vgets(char *str, int len, VFILE *f);
\r