-
Notifications
You must be signed in to change notification settings - Fork 0
/
VVV.bt
74 lines (65 loc) · 1.8 KB
/
VVV.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
//------------------------------------------------
//--- 010 Editor v13.0.2 Binary Template
//
// File: VVV.bt
// Authors: WarpZephyr
// Version: 1.0.0
// Purpose: Armored Core 2 Another Age VVV audio archives.
// Category: Archive
// File Mask: *.VVV
// ID Bytes:
// History:
//------------------------------------------------
BigEndian();
local int ALIGNMENT = 0x800;
//------------------------------------------------
void Align(int alignment)
{
local quad pos = FTell();
local quad remainder = pos % alignment;
if (remainder > 0)
{
FSkip(alignment - remainder);
}
}
//------------------------------------------------
typedef struct
{
char magic[4]; Assert(magic == "VAGp");
uint version;
uint unk08 <hidden=true>; Assert(unk08 == 0);
uint waveformDataSize;
uint sampleRate;
uint unk14 <hidden=true>; Assert(unk14 == 0);
uint unk18 <hidden=true>; Assert(unk18 == 0);
ushort unk1C <hidden=true>; Assert(unk1C == 0);
ubyte channelCount;
ubyte unk1F <hidden=true>; Assert(unk1F == 0);
char trackName[0x10];
uint unk30 <hidden=true>; Assert(unk30 == 0);
uint unk34 <hidden=true>; Assert(unk34 == 0);
uint unk38 <hidden=true>; Assert(unk38 == 0);
uint unk3C <hidden=true>; Assert(unk3C == 0);
ubyte data[waveformDataSize];
} VAGp <bgcolor=cLtGreen, read=ReadVAGp, optimize=false>;
string ReadVAGp(VAGp& sound)
{
return sound.trackName;
}
//------------------------------------------------
struct
{
while (!FEof())
{
// I don't like having to do this but I can't see any other way.
while (!FEof() && ReadString(FTell(), 4) != "VAGp")
{
Align(ALIGNMENT);
FSkip(ALIGNMENT);
}
if (!FEof())
{
VAGp file;
}
}
} Files;