-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMFXTemplate.bt
86 lines (79 loc) · 1.74 KB
/
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
//------------------------------------------------
//--- 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{
uint offset[Header.entryCount-1];
};
struct MFXStringTable{
string entryName;
};
typedef struct{
string name;
}Name;
typedef struct{
uint strOffset;
uint u1 : 6;
uint comp_type : 5;
uint comp_count : 11;
uint base_off : 9;
uint instancing : 1;
returnAdd = FTell();
FSeek(Header.stringTableOffset+strOffset);
Name name<optimize=false>;
FSeek(returnAdd);
}Attribute;
string readAttribute(Attribute &a){
return a.name.name;
};
struct MFXEntry{
uint string1;
uint 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;
uint field_8_c : 12;
uint field_C;
uint field_10;
ushort attributeCount;
ushort unkn;
if(field_8_a == 9){
uint unkn;
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;
MFXEntryOffsets EntryOffsets;
for(i=0;i<Header.entryCount-1;i++){
FSeek(EntryOffsets.offset[i]);
MFXEntry Entry<read=readStrings>;
};