-
Notifications
You must be signed in to change notification settings - Fork 1
/
pakfile.h
41 lines (36 loc) · 973 Bytes
/
pakfile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef PAKFILE_H
#define PAKFILE_H
struct PakEntry;
struct PakFile
{
/** Magic ID should always be the values 'PACK' in a valid pack file. */
char id[4];
/** Position of the list of pack entities from the start of the file. */
int entryOffset;
/** Size of the entity lump in the file. */
int entrySize;
/**
* Return true if the pack header/file is valid.
*/
bool isValid();
/**
* Return the number of entities in this pack.
*/
int entityCount();
/**
* Return the pointer to the pack entry lump.
*/
PakEntry *getPackEntries();
};
struct PakEntry
{
/** Filename including path and extension. */
char filename[56];
/** Position of entry in the pack. */
int filePosition;
/** Size of the entry in the pack. */
int fileLength;
/** Get a pointer to the entry data, given a pointer to the pack header. */
void *getFileData(void *pakHeader);
};
#endif // PAKFILE_H