-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMRL.bt
70 lines (66 loc) · 1.65 KB
/
MRL.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
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File:
// Authors:
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
local int i;
typedef struct{
long id<format=hex>;
if(id == 1297239040){
BigEndian();
};
uint unkn;
uint materialCount;
uint textureCount;
uint unkn;
uint textureOffset<format=hex>;
uint materialOffset<format=hex>;
}Header;
typedef struct{
// fileTypeCode for tex is [(zlib.crc32("rTexture".encode()) ^ 0xffffffff) & 0x7fffffff]
uint fileTypeCode<format=hex>;
byte unkn2[8];
char path[64];
}Texture;
typedef struct{
uint headId<format=hex>;
//for example (zlib.crc32("NPC_Mt__4".encode()) ^ 0xffffffff) & 0x7fffffff
uint materialNameHash<format=hex>;
uint matSize;
uint shaderHash<format=hex>;
uint skinid<format=hex>;
short unkn4;
ubyte floatArrOff;
ubyte unkn5[9];
ubyte unkn6;
ubyte unkn7[19];
uint startAddr<format=hex>;
uint unkn8;
}Material;
typedef struct{
ubyte type;
ubyte unkn1;
ubyte unkn2;
ubyte unkn3;
uint32 x<format=hex>;
//not so shure if this is correct
uint texIdx;
uint unkn5;
}Resbind;
struct MaterialDat(uint index){
byte data[Material1[index].matSize];
};
Header Header1<bgcolor=0x0000ff>;;
Texture Texture1[Header1.textureCount]<bgcolor=0x00ff00>;
Material Material1[Header1.materialCount]<bgcolor=0xff0000>;
for(i=0;i<Header1.materialCount;i++){
FSeek(Material1[i].startAddr);
MaterialDat materialData(i)<optimize=false,bgcolor=0xFF00FF>;
};