-
Notifications
You must be signed in to change notification settings - Fork 3
/
LOAD3D.h
executable file
·125 lines (111 loc) · 2.63 KB
/
LOAD3D.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#ifndef _LOAD3D_H_
#define _LOAD3D_H_
typedef struct CdlLOC {
unsigned char minute;
unsigned char second;
unsigned char sector;
unsigned char track;
} CdlLOC;
typedef struct CdlFILE {
CdlLOC pos;
unsigned long size;
char name[16];
} CdlFILE;
typedef struct CdlFILTER {
unsigned char file;
unsigned char chan;
unsigned short pad;
} CdlFILTER;
typedef struct CdCommand {
unsigned short flags;
unsigned char unused;
unsigned char cdCommand;
void* cdCmdParam[4];
} CdCommand;
typedef struct _BigFileEntry {
long fileHash;
long fileLen;
long filePos;
long checkSumFull;
} BigFileEntry;
typedef struct _BigFileDirEntry {
signed short streamUnitID;
signed short numFiles;
long subDirOffset;
} BigFileDirEntry;
typedef struct _BigFileDir {
long numFiles;
struct _BigFileEntry fileList[];
} BigFileDir;
typedef struct _BigFile {
long bigfileBaseOffset;
BigFileDir* rootDir;
BigFileDir* currentDir;
BigFileDir* cachedDir;
long currentDirID;
long cachedDirID;
long searchDirID;
long numSubDirs;
BigFileDirEntry* subDirList;
} BigFile;
typedef struct _NonBlockLoadEntry {
long fileHash;
long dirHash;
long filePos;
long long* loadAddr;
long loadSize;
long checksum;
long checksumType;
long memType;
long posInFile;
void (*retFunc);
void* retData;
void* retPointer;
char fileName[];
} NonBlockLoadEntry;
typedef struct _ReadQueueEntry {
long readStartPos;
long readSize;
long readCurSize;
void* readStartDest;
void* readCurDest;
long readStatus;
long checksum;
long checksumType;
void (*retFunc)(void*, void*);
void* retData;
void* retData2;
} ReadQueueEntry;
typedef struct _LoadQueueEntry {
struct _LoadQueueEntry* next;
signed short status;
signed char relocateBinary;
signed char mempackUsed;
NonBlockLoadEntry loadEntry;
long endLoadTime;
} LoadQueueEntry;
typedef struct _LoadStatus {
ReadQueueEntry currentQueueFile;
long state;
long bytesTransferred;
long lastCheckPos;
long cdWaitTime;
long* compSrcAddr;
long* compDstAddr;
long compControlbits;
long compControl;
long compEndBytes;
long decompressLen;
long checksum;
long long* checkAddr;
BigFile bigFile;
void* buffer1;
void* buffer2;
unsigned int changeDir;
long endLoadTime;
long currentDirLoading;
long currentSector;
long sectorTime;
long seekTime;
} LoadStatus;
#endif