Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




CommitLineData
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
17void * CWadOpenArchive(const TCHAR *pszFileName);
18bool CWadCloseArchive(void *hCWAD);
19unsigned long CWadGetArchiveInfo(void *hCWAD, int nInfoType);
20unsigned 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)
21void * CWadOpenFile(void *hCWAD, const char *pszFileName);
22bool CWadCloseFile(void *hFile);
23unsigned long CWadGetFileSize(void *hFile);
24unsigned long CWadGetFileInfo(void *hFile, int nInfoType);
25unsigned long CWadSetFilePointer(void *hFile, long nDistanceToMove, int nMoveMethod);
26unsigned long CWadReadFile(void *hFile, void *pBuffer, unsigned long nNumberOfBytesToRead);
27unsigned long CWadFindHeader(FILE *pFile);
28
29#endif