-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathWorldOfWarcraft_M3.bt
More file actions
109 lines (95 loc) · 1.74 KB
/
Copy pathWorldOfWarcraft_M3.bt
File metadata and controls
109 lines (95 loc) · 1.74 KB
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
//--------------------------------------
// File: WorldOfWarcraft_M3.bt
// Authors: Zee
// Version: 1.0
// Purpose: M3 Main File
// Category: WoW
//--------------------------------------
#include "Lib/Common.bt"
struct m3SL
{
char chunkID[4];
int version;
int a2_2; // 182 offset ?
int a2_3;
int m_shader_size;
int a2_5;
int64 a2_6;
};
struct m3SH
{
char chunkID[4];
int unk0[3];
int blsFileID;
int tafgFileID;
int unk1[4];
};
struct m3SP
{
char chunkID[4];
int unk0[25];
int unk1[10];
};
struct m3ST
{
char chunkID[4];
int unk0[10];
short unk1[6];
int unk2[6];
};
struct m3SS
{
char chunkID[4];
int unk0[10];
short unk1[10];
int unk2[14];
};
struct m3MD
{
char chunkID[4];
int unk0[27];
float unk1[8];
int unk2;
int textureFileIDs[3];
int unk3[10];
};
struct UnkA // 168
{
int index;
int64 unk0;
int unk1;
int hasunk0;
int hashunk1;
int64 unk2;
int countA; // 32 * countA
byte data[132];
};
struct m3S2
{
char chunkID[4];
// m3SL
int version;
int a2_2;
int a2_3;
int m_shader_size;
int a2_5;
int a2_6;
FSeek(4 * a2_5);
UnkA unkA[m_shader_size]<bgcolor=cYellow>;
};
struct M3
{
while( ! FEof() )
{
if ( matchr( "m3SL" ) ) m3SL shaderLibrary;
else if( matchr( "m3SH" ) ) m3SH shader;
else if( matchr( "m3SP" ) ) m3SP shaderParameters;
else if( matchr( "m3ST" ) ) m3ST shaderTextures;
else if( matchr( "m3SS" ) ) m3SS shaderSamplers;
else if( matchr( "m3MD" ) ) m3MD materialData;
else if( matchr( "m3S2" ) ) m3S2 shaderLibraryV2;
//else SKIPCHUNK unk;
else break;
}
};
M3 m3;