forked from kapuragu/FoxEngineTemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsab.bt
162 lines (137 loc) · 4.03 KB
/
sab.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// SAL - Stream Animation
// By RLC - inspired by other FOX templates by the researchers of Modders' Heaven!
local int GzsOrTpp = 0;
enum LipAnimIndex
{
A = 0,
AH = 1,
AY = 2,
B = 3,
C = 4,
CH = 5,
D = 6,
E = 7,
EE = 8,
ER = 9,
F = 10,
G = 11,
H = 12,
I = 13,
J = 14,
L = 15,
M = 16,
N = 17,
NG = 18,
OH = 19,
OO = 20,
OU = 21,
OW = 22,
OY = 23,
P = 24,
R = 25,
S = 26,
SH = 27,
T = 28,
TH = 29,
TT = 30,
U = 31,
V = 32,
W = 33,
Y = 34,
Z = 35,
_i = 36,
_tH = 37,
};
struct StreamAnimationLip
{
char sign[4];
int entryCount;
struct Sa3Params
{
uint64 fileName <comment="StrCode64 hash of the file name, string embedded in .wem file, *not* tolowered", bgcolor=0x776C7C>;
int offsetToEntryStart <bgcolor=0x94A6AA>;
FSkip(4);
} sa3Params[entryCount];
struct Sa3Entry
{
int subEntryCount;//2
struct SubEntryData{
char entryType[];
if (FTell() % 4 != 0)
FSkip(4 - FTell() % 4);
int offsetToEntry;
} subEntryData[subEntryCount] <bgcolor=0x776C7C>;
local int index = 0;
struct SubEntry
{
if (subEntryData[index].entryType=="ls")
{
struct Header
{
int keyCount <comment="Key count including key zero">;
short offsetToKey[keyCount] <comment="Offset from keyCount", bgcolor=0x94A6AA>;
if (GzsOrTpp == 1)
if (FTell() % 4 != 0)
FSkip(4 - FTell() % 4);
} header <bgcolor=0x776C7C>;
struct KeysGZ
{
// this is "key zero" - this counts as a key for everything before it
ushort defaultPosition <comment="Position of a keyframe in the timeline.", fgcolor=0xFF0000, bgcolor=0x87E7FF>;
ushort defaultIntensity <comment="Always empty?", fgcolor=0x0000FF, bgcolor=0x87E7FF>;
byte paramsCount <bgcolor=0xB9C199>;
FSkip(3);
int keyZeroParam0 <bgcolor=0xB9C199>; Assert(keyZeroParam0==0,".ls KeyZero Param0 Isn't 0!!!!");
int keyCount2 <comment="Amount of keys aside from key zero... most of the time", bgcolor=0xB9C199>; //inaccurate in vox_ene_common_ru?
int keyZeroParam2 <comment="Most of the time 1, rarely 2 (vox_0100e chico-paz)", bgcolor=0xB9C199>; Assert(keyZeroParam2==1||keyZeroParam2==2,".ls KeyZero Param2 Isn't 1 or 2!!!!");
if (keyZeroParam2==2)
Printf("\n keyZeroParam2==2");
local int realKeyCount = header.keyCount - 1;
Assert(keyCount2==realKeyCount,"Wierd Keycount!!!!");
struct KeyGZ
{
//these are keyframes
ushort position <comment="Position of a keyframe in the timeline.", fgcolor=0xFF0000, bgcolor=0x87E7FF>;
ushort intensity <comment="Duration or intensity?", fgcolor=0x0000FF, bgcolor=0x87E7FF>;
byte lipAnimCount <bgcolor=0xB8F8EB>;
byte strengthCount <comment="GZ doesn't have this, but TPP absolutely requires it!", bgcolor=0xA3D0D1>;
FSkip(2);
LipAnimIndex lipAnimIndex[lipAnimCount] <comment="Index of the mouth animation to play", bgcolor=0xB8F8EB>;
float strength[strengthCount] <comment="GZ doesn't have this, but TPP absolutely requires it!", bgcolor=0xA3D0D1>;
} keyGZ[realKeyCount] <optimize=false>;
if (GzsOrTpp == 1)
{
FSkip(1);
if (FTell() % 8 != 0)
FSkip((8 - (FTell() % 8)-2));
}
else
{
FSkip(1);
if (FTell() % 2 != 0)
FSkip((2 - (FTell() % 2)));
}
} keysGZ <optimize=false>;
}
else if (subEntryData[index].entryType=="st")
{
struct MessageIdSection
{
int unknown0 <bgcolor=0x58D7E9>;
ushort unk0 <bgcolor=0x58D7E9>;
int unknown1 <bgcolor=0x58D7E9>;
ushort unk1 <bgcolor=0x58D7E9>;
ushort unk2 <bgcolor=0x58D7E9>;
int unknown3 <bgcolor=0x58D7E9>;
char messageId[] <bgcolor=0x737329>;
if (FTell() % 4 != 0)
FSkip(4 - FTell() % 4);
} messageIdSection <optimize=false>;
};
char fileNameBackwards[6] <comment="Just backwards endianness file name?">;
if (FTell() % 16 != 0)
FSkip(16 - (FTell() % 16));
index+=1;
} subEntry[subEntryCount] <optimize=false>;
} sa3Entry[entryCount] <optimize=false>;
} streamAnimationLip;