2 * $Logfile: /Freespace2/code/CFile/CfileArchive.h $
7 * External def's for CfileArchive.cpp. This should only be used
8 * internally by cfile stuff.
11 * Revision 1.1 2002/05/03 03:28:11 root
15 * 2 10/07/98 10:52a Dave
18 * 1 10/07/98 10:48a Dave
20 * 4 5/11/98 10:59a John
21 * Moved the low-level file reading code into cfilearchive.cpp.
23 * 3 4/30/98 4:53p John
24 * Restructured and cleaned up cfile code. Added capability to read off
25 * of CD-ROM drive and out of multiple pack files.
27 * 2 12/28/97 12:42p John
28 * Put in support for reading archive files; Made missionload use the
29 * cf_get_file_list function. Moved demos directory out of data tree.
31 * 1 12/28/97 11:48a John
36 #ifndef _CFILEARCHIVE_H
37 #define _CFILEARCHIVE_H
39 #ifndef _CFILE_INTERNAL
40 #error This file should only be included internally in CFILE!!
43 // The following Cfile_block data is private to cfile.cpp
44 // DO NOT MOVE the Cfile_block* information to cfile.h / do not extern this data
46 #define CFILE_BLOCK_UNUSED 0
47 #define CFILE_BLOCK_USED 1
49 typedef struct Cfile_block {
50 int type; // CFILE_BLOCK_UNUSED, CFILE_BLOCK_USED
51 int dir_type; // directory location
52 FILE *fp; // File pointer if opening an individual file
53 void *data; // Pointer for memory-mapped file access. NULL if not mem-mapped.
54 HANDLE hInFile; // Handle from CreateFile()
55 HANDLE hMapFile; // Handle from CreateFileMapping()
58 int size; // for packed files
62 #define MAX_CFILE_BLOCKS 64
63 extern Cfile_block Cfile_block_list[MAX_CFILE_BLOCKS];
64 extern CFILE Cfile_list[MAX_CFILE_BLOCKS];
66 // Called once to setup the low-level reading code.
67 void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size );