Skip to content

Commit 54a2398

Browse files
committed
Implemented Sound and Acoustic Spaces
1 parent b8b237a commit 54a2398

26 files changed

Lines changed: 1663 additions & 14 deletions

ESPSharp/ESPSharp.csproj

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@
6262
</Compile>
6363
<Compile Include="Enums\ActorValuesByte.cs" />
6464
<Compile Include="Enums\BodyPartIndex.cs" />
65+
<Compile Include="Enums\EnvironmentType.cs" />
6566
<Compile Include="Enums\Flags\DecalDataFlags.cs" />
6667
<Compile Include="Enums\Flags\RaceFlags.cs" />
68+
<Compile Include="Enums\Flags\SoundDataFlags.cs" />
6769
<Compile Include="Enums\HairColor.cs" />
6870
<Compile Include="Enums\HeadPartIndex.cs" />
71+
<Compile Include="Enums\IsInterior.cs" />
6972
<Compile Include="Interfaces\ICloneable.cs" />
7073
<Compile Include="Enums\ActorValues.cs" />
7174
<Compile Include="Enums\DataSource.cs" />
@@ -107,6 +110,11 @@
107110
<Compile Include="Groups\TopicGroup.cs" />
108111
<Compile Include="Groups\WorldGroup.cs" />
109112
<Compile Include="Records\GameSetting.cs" />
113+
<Compile Include="Records\GeneratedCode\AcousticSpace.cs">
114+
<AutoGen>True</AutoGen>
115+
<DesignTime>True</DesignTime>
116+
<DependentUpon>AcousticSpace.tt</DependentUpon>
117+
</Compile>
110118
<Compile Include="Records\GeneratedCode\Class.cs">
111119
<AutoGen>True</AutoGen>
112120
<DesignTime>True</DesignTime>
@@ -157,6 +165,11 @@
157165
<DesignTime>True</DesignTime>
158166
<DependentUpon>Race.tt</DependentUpon>
159167
</Compile>
168+
<Compile Include="Records\GeneratedCode\Sound.cs">
169+
<AutoGen>True</AutoGen>
170+
<DesignTime>True</DesignTime>
171+
<DependentUpon>Sound.tt</DependentUpon>
172+
</Compile>
160173
<Compile Include="Records\GenericRecord.cs" />
161174
<Compile Include="Records\GeneratedCode\TextureSet.cs">
162175
<AutoGen>True</AutoGen>
@@ -210,10 +223,18 @@
210223
<DesignTime>True</DesignTime>
211224
<DependentUpon>HeadModel.tt</DependentUpon>
212225
</Compile>
226+
<None Include="Records\GeneratedCode\AcousticSpace.tt">
227+
<Generator>TextTemplatingFileGenerator</Generator>
228+
<LastGenOutput>AcousticSpace.cs</LastGenOutput>
229+
</None>
213230
<None Include="Records\GeneratedCode\Race.tt">
214231
<Generator>TextTemplatingFileGenerator</Generator>
215232
<LastGenOutput>Race.cs</LastGenOutput>
216233
</None>
234+
<None Include="Records\GeneratedCode\Sound.tt">
235+
<Generator>TextTemplatingFileGenerator</Generator>
236+
<LastGenOutput>Sound.cs</LastGenOutput>
237+
</None>
217238
<None Include="SubrecordCollections\GeneratedCode\FaceGenData.tt">
218239
<Generator>TextTemplatingFileGenerator</Generator>
219240
<LastGenOutput>FaceGenData.cs</LastGenOutput>
@@ -294,6 +315,21 @@
294315
<DesignTime>True</DesignTime>
295316
<DependentUpon>Relationship.tt</DependentUpon>
296317
</Compile>
318+
<Compile Include="Subrecords\GeneratedCode\SoundAttenuation.cs">
319+
<AutoGen>True</AutoGen>
320+
<DesignTime>True</DesignTime>
321+
<DependentUpon>SoundAttenuation.tt</DependentUpon>
322+
</Compile>
323+
<Compile Include="Subrecords\GeneratedCode\SoundData.cs">
324+
<AutoGen>True</AutoGen>
325+
<DesignTime>True</DesignTime>
326+
<DependentUpon>SoundData.tt</DependentUpon>
327+
</Compile>
328+
<Compile Include="Subrecords\GeneratedCode\SoundDataShort.cs">
329+
<AutoGen>True</AutoGen>
330+
<DesignTime>True</DesignTime>
331+
<DependentUpon>SoundDataShort.tt</DependentUpon>
332+
</Compile>
297333
<Compile Include="Subrecords\SimpleSubrecord.cs" />
298334
<Compile Include="Subrecords\SubMarker.cs" />
299335
<Compile Include="Subrecords\UndecodedSubrecord.cs" />
@@ -441,6 +477,18 @@
441477
<Generator>TextTemplatingFileGenerator</Generator>
442478
<LastGenOutput>Relationship.cs</LastGenOutput>
443479
</None>
480+
<None Include="Subrecords\GeneratedCode\SoundAttenuation.tt">
481+
<Generator>TextTemplatingFileGenerator</Generator>
482+
<LastGenOutput>SoundAttenuation.cs</LastGenOutput>
483+
</None>
484+
<None Include="Subrecords\GeneratedCode\SoundData.tt">
485+
<Generator>TextTemplatingFileGenerator</Generator>
486+
<LastGenOutput>SoundData.cs</LastGenOutput>
487+
</None>
488+
<None Include="Subrecords\GeneratedCode\SoundDataShort.tt">
489+
<Generator>TextTemplatingFileGenerator</Generator>
490+
<LastGenOutput>SoundDataShort.cs</LastGenOutput>
491+
</None>
444492
<None Include="Subrecords\GeneratedCode\SubrecordTemplate.t4" />
445493
</ItemGroup>
446494
<ItemGroup>

ESPSharp/Enums/EnvironmentType.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace ESPSharp.Enums
8+
{
9+
public enum EnvironmentType : uint
10+
{
11+
None,
12+
Default,
13+
Generic,
14+
PaddedCell,
15+
Room,
16+
Bathroom,
17+
Livingroom,
18+
StoneRoom,
19+
Auditorium,
20+
ConcertHall,
21+
Cave,
22+
Arena,
23+
Hangar,
24+
CarpetedHallway,
25+
Hallway,
26+
StoneCorridor,
27+
Alley,
28+
Forest,
29+
City,
30+
Mountains,
31+
Quarry,
32+
Plain,
33+
ParkingLot,
34+
SewerPipe,
35+
Underwater,
36+
SmallRoom,
37+
MediumRoom,
38+
LargeRoom,
39+
MediumHall,
40+
LargeHall,
41+
Plate
42+
}
43+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace ESPSharp.Enums.Flags
8+
{
9+
[Flags]
10+
public enum SoundDataFlags : uint
11+
{
12+
RandomFrequencyShift = 0x01,
13+
PlayAtRandom = 0x02,
14+
EnvironmentIgnored = 0x04,
15+
RandomLocation = 0x08,
16+
Loop = 0x10,
17+
MenuSound = 0x20,
18+
_2D = 0x40,
19+
_360LFE = 0x80,
20+
DialogueSound = 0x0100,
21+
EnvelopeFast = 0x0200,
22+
EnvelopeSlow = 0x0400,
23+
_2DRadius = 0x0800,
24+
MuteWhenSubmerged = 0x1000,
25+
StartAtRandomPosition = 0x2000
26+
}
27+
}

ESPSharp/Enums/IsInterior.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace ESPSharp.Enums
8+
{
9+
public enum IsInteriorEnum : uint
10+
{
11+
No = 1,
12+
Yes
13+
}
14+
}

ESPSharp/Groups/TopGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TopGroup : Group
2222
{"EYES", "Eyes"},
2323
{"RACE", "Races"},
2424
{"SOUN", "Sounds"},
25-
{"ASPC", "Audio Spaces"},
25+
{"ASPC", "Acoustic Spaces"},
2626
{"MGEF", "Magic Effects"},
2727
{"SCPT", "Scripts"},
2828
{"LTEX", "Landscape Textures"},

ESPSharp/Record.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ public static Record CreateRecord(string Tag)
225225
case "RACE":
226226
outRecord = new Race();
227227
break;
228+
case "SOUN":
229+
outRecord = new Sound();
230+
break;
231+
case "ASPC":
232+
outRecord = new AcousticSpace();
233+
break;
228234
default:
229235
outRecord = new GenericRecord();
230236
break;

0 commit comments

Comments
 (0)