Commit | Line | Data |
cfca19c6 |
1 | #ifndef CWADLIB_INCLUDED |
2 | #define CWADLIB_INCLUDED |
3 | |
4 | #include <tchar.h> |
5 | |
6 | #define CWAD_INFO_NUM_FILES 0x03 //Number of files in CWAD |
7 | #define CWAD_INFO_SIZE 0x05 //Size of CWAD or uncompressed file |
8 | #define CWAD_INFO_COMPRESSED_SIZE 0x06 //Size of compressed file |
9 | #define CWAD_INFO_FLAGS 0x07 //File flags (compressed, etc.) |
10 | #define CWAD_INFO_PARENT 0x08 //Handle of CWAD that file is in |
11 | #define CWAD_INFO_POSITION 0x09 //Position of file pointer in files |
12 | |
13 | #define CWAD_FILE_BEGIN 0 |
14 | #define CWAD_FILE_CURRENT 1 |
15 | #define CWAD_FILE_END 2 |
16 | |
17 | void * CWadOpenArchive(const TCHAR *pszFileName); |
18 | bool CWadCloseArchive(void *hCWAD); |
19 | unsigned long CWadGetArchiveInfo(void *hCWAD, int nInfoType); |
20 | unsigned long CWadListFiles(void *hCWAD, char *pmszBuffer, unsigned long nBufferLength); // Returns required buffer size. Strings are in multi string form. (null-terminated strings with an extra null after the last string) |
21 | void * CWadOpenFile(void *hCWAD, const char *pszFileName); |
22 | bool CWadCloseFile(void *hFile); |
23 | unsigned long CWadGetFileSize(void *hFile); |
24 | unsigned long CWadGetFileInfo(void *hFile, int nInfoType); |
25 | unsigned long CWadSetFilePointer(void *hFile, long nDistanceToMove, int nMoveMethod); |
26 | unsigned long CWadReadFile(void *hFile, void *pBuffer, unsigned long nNumberOfBytesToRead); |
27 | unsigned long CWadFindHeader(FILE *pFile); |
28 | |
29 | #endif |