-
Notifications
You must be signed in to change notification settings - Fork 0
/
CFileArchiveItem.h
executable file
·53 lines (38 loc) · 1.02 KB
/
CFileArchiveItem.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
42
43
44
45
46
47
48
49
50
51
52
53
/*
CPakStream.h
Author: Tom Naughton
Description: <describe the CPakStream class here>
*/
#ifndef CPakStream_H
#define CPakStream_H
#include <iostream.h>
#include "CFileArchive.h"
class CPakStream
{
public:
CPakStream(FSSpec inFileSpec);
CPakStream(CFileArchive *inArchive, string inName, long inIndex, Handle inHandle);
virtual ~CPakStream();
string dataType();
StringPtr itemTitle();
string pathName();
CFileArchive *_archive;
string _name;
long _index;
string name() { return _name; }
CFileArchive *fileArchive() { return _archive; }
CFileArchive *rootArchive() { if (_archive) return _archive->rootArchive(); else return nil; }
Boolean getBytes(unsigned long nBytes, void *bytes);
long GetSize() { return _size; };
char *getData(char *name);
void resetCursor() { _dataCursor = 0; };
static void dumpHeap();
private:
typedef TArray<CPakStream*> item_array;
static item_array _allocatedItems;
Handle _dataHandle;
UInt32 _dataCursor;
UInt32 _size;
void LoadFromPak();
};
#endif // CPakStream_H