This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
CLM2.bt
62 lines (51 loc) · 1.47 KB
/
CLM2.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
//------------------------------------------------
//--- 010 Editor v9.0.1 Binary Template
//
// File: CLM2.bt
// Authors: TKGP
// Version:
// Purpose: Cloth-related .clm2 files
// Category: Dantelion
// File Mask: *.clm2
// ID Bytes: 43 4C 4D 32
// History:
//------------------------------------------------
#include "Util.bt"
LittleEndian();
//------------------------------------------------
typedef struct {
char magic[4]; Assert(magic == "CLM2");
int unk04; Assert(unk04 == 0);
short unk08; Assert(unk08 == 1);
short unk0A; Assert(unk0A == 1);
int unk0C; Assert(unk0C == 0);
int unk10; Assert(unk10 == 0);
int count;
int unk18; Assert(unk18 == 0x28);
int unk1C; Assert(unk1C == 0);
int unk20; Assert(unk20 == 0);
int unk24; Assert(unk24 == 0x28);
} Header <bgcolor=cLtRed>;
typedef struct {
short unk00;
short unk02;
} EntryItem <read=ReadEntryItem, bgcolor=cAqua>;
string ReadEntryItem(EntryItem& item) {
string str;
return SPrintf(str, "%3i %3i", item.unk00, item.unk02);
}
typedef struct {
int unk00 <hidden=true>; Assert(unk00 == 0);
int count;
int offset;
int unk0C <hidden=true>; Assert(unk0C == 0);
if (count > 0) {
local quad pos <hidden=true> = FTell();
FSeek(offset);
EntryItem items[count];
FSeek(pos);
}
} Entry <bgcolor=cLtGreen, optimize=false>;
//------------------------------------------------
Header header;
Entry entries[header.count];