-
Notifications
You must be signed in to change notification settings - Fork 0
/
sphinx_sfx_file.bt
83 lines (75 loc) · 1.98 KB
/
sphinx_sfx_file.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
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: SphinxMusics.bt
// Authors: jmarti856
// Version: 1.0
// Purpose: Parse Temporal SFX files.
// Category: Audio
// File Mask: *.sfx
// ID Bytes:
// History:
//------------------------------------------------
//*===============================================================================================
//* Typedefs for the sfx file
//*===============================================================================================
typedef char Padding[2];
//*===============================================================================================
//* DEFINE STRUCTS USED IN THE SFX FILE
//*===============================================================================================
//The first parameters of the header ara always little endian
LittleEndian();
typedef struct
{
uint HashCode<format=hex>;
uint Location<format=hex>;
} SoundsArray;
typedef struct
{
short DuckerLength;
short MinDelay;
short MaxDelay;
short InnerRadiusReal;
short OuterRadiusReal;
byte ReverbSend;
byte TrackingType;
byte MaxVoices;
byte Priority;
byte Ducker;
byte MasterVolume;
ushort Flags;
short SamplesCount;
} Sounds;
typedef struct
{
short FileRef;
short PitchOffset;
short RandomPitchOffset;
byte BaseVolume;
byte RandomVolumeOffset;
byte Pan;
byte RandomPan;
Padding SectPadding;
} Samples;
//Get the number of stored sounds in this section
local int totalSounds = ReadUInt(FTell());
FSkip(sizeof(UINT));
//Read SFX Array & SFX Params
local int index = 0;
local int indexSamples = 0;
local long currentPos = 0;
for (index = 0; index < totalSounds; index++)
{
SetBackColor(cBlue);
SoundsArray StoredSound;
currentPos = FTell();
FSeek(StoredSound.Location);
SetBackColor(cLtRed);
Sounds sfxParams;
for (indexSamples = 0; indexSamples < sfxParams.SamplesCount; indexSamples++)
{
SetBackColor(cAqua);
Samples smpParams;
}
FSeek(currentPos);
}