-
Notifications
You must be signed in to change notification settings - Fork 0
/
FXM(keypose).bt
126 lines (102 loc) · 1.86 KB
/
FXM(keypose).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
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
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
typedef struct {
UINT Length;
CHAR Text[Length];
} CSTRING;
typedef struct {
FLOAT x;
FLOAT y;
FLOAT z;
FLOAT w;
} VECTOR_4F;
typedef struct {
FLOAT x;
FLOAT y;
FLOAT z;
} VECTOR_3F;
typedef struct {
VECTOR_4F XAxis;
VECTOR_4F YAxis;
VECTOR_4F ZAxis;
VECTOR_4F Position;
} MATRIX4x4;
typedef struct {
FLOAT x;
FLOAT y;
} VECTOR_2F;
typedef struct {
UINT16 x;
UINT16 y;
UINT16 z;
} VECTOR_SHORT;
typedef struct {
VECTOR_3F Coordinates;
VECTOR_3F Normal;
VECTOR_2F UV;
} VERTEX;
//---------------------------------
struct {
UINT Unknown;
UINT Unknown;
UINT BoneCount;
} HEADER;
typedef struct {
UINT Unknown;
UINT Unknown;
CSTRING Name;
INT ParentIndex;
MATRIX4x4 Matrix;
} BONE <name=getName>;
string getName(BONE &bone) {
return bone.Name.Text;
}
struct {
BONE Bone[HEADER.BoneCount] <optimize=false>;
} BONES;
if (HEADER.BoneCount != 0)
BYTE Data[44];
else
BYTE Data[32];
UINT Count;
CSTRING Name;
UINT Unknown;
UINT Unknown;
UINT Unknown;
UINT Unknown;
UINT Unknown;
UINT Unknown;
UINT FaceCount;
UINT VertexCount;
VECTOR_SHORT FaceIndexes1[FaceCount];
VERTEX Vertex[VertexCount];
if (HEADER.BoneCount != 0)
struct {
VECTOR_3F Coordinates;
UBYTE WeightCount;
UBYTE Unknown;
UBYTE Unknown;
UBYTE Unknown;
FLOAT VertexWeight1;
FLOAT VertexWeight2;
FLOAT VertexWeight2;
FLOAT VertexWeight3;
UBYTE BoneIndex1;
if (BoneIndex1 == 255)
klugjlkg();
UBYTE BoneIndex2;
UBYTE BoneIndex3;
UBYTE BoneIndex4;
VECTOR_3F Normal;
VECTOR_2F UV;
} VERTEX_DATA[VertexCount] <name="Weights">;