forked from Sparagas/Silent-Hill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common archive afs.bt
58 lines (45 loc) · 899 Bytes
/
common archive afs.bt
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
//------------------------------------------------
//--- 010 Editor v13.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
char magic[4];
uint32 file_count;
struct TOC {
uint32 file_offset;
uint32 file_size;
} toc[file_count];
uint32 filename_offset;
uint32 filename_size;
if (filename_offset == 0) {
FSeek(toc[0].file_offset);
FSkip(-8);
uint32 filename_offset;
uint32 filename_size;
}
struct files {
char data[toc[i].file_size];
};
local int i;
for (i=0; i < file_count; i++) {
FSeek(toc[i].file_offset);
files file;
};
FSeek(filename_offset);
struct Directory {
char name[32];
uint16 year;
uint16 month;
uint16 day;
uint16 hour;
uint16 minute;
uint16 second;
uint32 file_size_2;
} directory[file_count];