-
Notifications
You must be signed in to change notification settings - Fork 9
/
CLF.bt
102 lines (93 loc) · 1.86 KB
/
CLF.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
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: CLF.bt
// Authors: Alexander Evdokimov
// Version: 0.1
// Purpose: Sea Dogs game CLF files
// File Mask: *.clf
//
// History:
//
// 2018.06 v0.1 Initial release
//
//------------------------------------------------
struct {
UINT Unknown <name="Signature?">;
UINT Unknown; // 2494616
UINT Unknown; // 0
UINT Unknown; // 0
UINT LodCount; // 1
UINT TextureCount;
// long double
UINT Unknown;
UINT MeshCount;
UINT Unknown; // 0
//
UINT AnimationCount; // 886
UINT Unknown; // 0
UINT Unknown; // 0
} HEADER;
typedef struct {
char FileName[256];
} FILENAME <name=getfileName>;
typedef struct (uint size) {
FILENAME array[size];
} TEXTURES;
string getfileName(FILENAME &fn) {
return fn.FileName;
};
TEXTURES FileNames(HEADER.TextureCount) <name="Textures">;
typedef struct {
struct {
char Name[32];
UINT FrameCount;
UINT TextureIndex;
UINT VertexCount;
UINT FaceCount;
UBYTE Empty[96];
} HEADER <name="Header">;
struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
FLOAT Unknown;
FLOAT Unknown;
FLOAT Unknown;
INT Unknown;
} VERTEXES[HEADER.VertexCount];
struct {
UINT16 I1;
UINT16 I2;
UINT16 I3;
UINT16 Zero;
FLOAT U1;
FLOAT V1;
FLOAT U2;
FLOAT V2;
FLOAT U3;
FLOAT V3;
} FACES[HEADER.FaceCount];
struct {
struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
} POSITION;
struct {
FLOAT X;
FLOAT Y;
FLOAT Z;
} ROTATION;
FLOAT Frame; //
} ANIMATIONS[HEADER.FrameCount];
} MESH <name=getName>;
typedef struct (uint size) {
MESH array[size] <optimize=false>;
} MESHES;
string getName(MESH &ms) {
return ms.HEADER.Name;
};
struct {
MESHES Meshes(HEADER.MeshCount) <name="Meshes">;
} LODS[HEADER.LodCount] <name="Lods">;