-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEPV3.bt
129 lines (114 loc) · 3.2 KB
/
EPV3.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
125
126
127
128
129
//------------------------------------------------
//--- 010 Editor v9.0 Binary Template
//
// File:
// Authors: AsteriskAmpersand, Crimson, StageNRyu, Ice
// Version: 1.0
// Purpose:
// Category:
// File Mask: *.epv3
// ID Bytes:
// History:
//------------------------------------------------
typedef struct {
float f1;
float f2;
float f3;
float f4;
int32 separator;
}f4;
typedef struct {
float f1;
byte b1;
byte b2;
byte b3;
byte b4;
int32 i1;
float f2;
float f3;
int32 separator;
}block;
typedef struct{
string path;
}packed_path;
typedef struct {
int32 efxslot<bgcolor=0x3c14dc>;
int32 hexcolor<bgcolor=0x0000ff>;
float saturation<bgcolor=0x3c14dc>;
int32 size<bgcolor=0x3c14ac>;
float frequency<bgcolor=0x3c14ac>;
}epvcolor;
typedef struct {
packed_path paths[4]<optimize=false>;
int32 padding;
int32 unknownID;
short recordID;
int32 paramU_0[3]<bgcolor=0x95c9a6>;//12 might be short followed by another short
float paramU_1<bgcolor=0x95c9a6>;
int32 paramU_2[4]<bgcolor=0x95c9a6>;
short paramU_3[2]<bgcolor=0x95c9a6>;
short paramU_4[2]<bgcolor=0x95c9a6>;
int32 paramU_5[2]<bgcolor=0x95c9a6>;
float PositionX<bgcolor=0xff0000>;
float PositionY<bgcolor=0xff3000>;
float PositionZ<bgcolor=0xff6000>;
int32 paramU1[3]<bgcolor=0x00c9a6>;//always 0
float RotationX<bgcolor=0x0030ff>;
float RotationY<bgcolor=0x0060ff>;
float RotationZ<bgcolor=0x0090ff>;
float paramU2[3]<bgcolor=0xa009000>;//first field always 0
int32 paramU3[2]<bgcolor=0xa00f000>;
int32 boneID<bgcolor=0xffffff>;
int32 paramU4[3]<bgcolor=0x95c9a6>;
epvcolor epvc[8];
float separator[2]<bgcolor=0x00802b>;
block block1<bgcolor=0x85adad>;
int32 paramV[4]<bgcolor=0x3d5c5c>;
}record;
string readRecordGroup(record& group){
local string s;
SPrintf(s,"%d|%d: %s - RGB: %X",group.unknownID, group.recordID, group.paths[0].path,group.epvc[0].hexcolor);
return s;
}
typedef struct {
uint32 recordCount;
short groupID;
record records[recordCount]<optimize=false, name="Records Group", bgcolor=0xddaaff, read = readRecordGroup>;
}group;
typedef struct{
uint32 trailID;
uint32 blockID;
uint32 recordID;
}trailRecord;
typedef struct{
uint64 padding;
uint32 trailCount;
trailRecord trails[trailCount];
string epvPath;
byte ONE;
uint32 NULL;
}trail;
string readEfxGroup(group& efx){
local string s;
SPrintf(s,"ID: % 4d - #%d",efx.groupID,efx.recordCount);
return s;
}
typedef struct{
uint32 blockCount;
group effectGroups[blockCount]<optimize=false, bgcolor=0x84b3ff, read = readEfxGroup>;
}blockSection;
uint64 signature;
blockSection blocks;
trail closingTrail<optimize=false, name="Effects Trail", bgcolor=0xbbbb00>;
local int i;
local int j;
local int z;
z = 0;
for (i = 0; i < blocks.blockCount; i++){
for (j=0; j<blocks.effectGroups[i].recordCount; j++){
Printf("GroupID - Trail Data: %d:%d - %d\n",blocks.effectGroups[i].groupID,j,closingTrail.trails[z+j].trailID);
}
z += blocks.effectGroups[i].recordCount;
};
Printf("Record Count: %d\n",z);
Printf("Trail Count: %d\n",closingTrail.trailCount);