-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMHS2-MFXTemplate.bt
91 lines (84 loc) · 1.83 KB
/
MHS2-MFXTemplate.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
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
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
local int i;
local int j;
typedef struct{
byte MFX0[4];
short reserved_4;
short reserved_6;
int field_8;
int entryCount;
int stringTableOffset;
int field_14;
}MFXHeader;
struct MFXEntryOffsets{
uint64 offset[Header.entryCount];
};
struct MFXStringTable{
string entryName;
};
typedef struct{
string name;
}Name;
typedef struct{
uint64 strOffset;
uint u1 : 6;
uint comp_type : 5;
uint comp_count : 11;
uint base_off : 9;
uint instancing : 1;
uint null;
returnAdd = FTell();
FSeek(Header.stringTableOffset+strOffset);
Name name<optimize=false>;
FSeek(returnAdd);
}Attribute;
string readAttribute(Attribute &a){
return a.name.name;
};
struct MFXEntry{
uint64 string1;
uint64 string2;
local uint returnAdd = FTell();
FSeek(Header.stringTableOffset+string1);
string name1;
FSeek(Header.stringTableOffset+string2);
string name2;
FSeek(returnAdd);
uint field_8_a : 6;
uint field_8_b : 16;
ushort unknShort;
ushort index;
uint field_C;
uint field_10;
uint64 unkn7;
ushort attributeCount;
ushort unkn;
if(field_8_a == 9){
uint unkn;
uint64 unkn8;
Attribute attribute[attributeCount]<read=readAttribute,optimize=false>;
};
};
string readStrings(MFXEntry &p){
string s;
SPrintf( s, "%s, %s", (string)p.name1,(string)p.name2);
return s;
}
MFXHeader Header;
FSkip(8);
MFXEntryOffsets EntryOffsets;
for(i=0;i<Header.entryCount;i++){
FSeek(EntryOffsets.offset[i]);
MFXEntry Entry<read=readStrings>;
};