aboutsummaryrefslogtreecommitdiff
path: root/pkg/messages/types/svcSounds.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/messages/types/svcSounds.go')
-rw-r--r--pkg/messages/types/svcSounds.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/pkg/messages/types/svcSounds.go b/pkg/messages/types/svcSounds.go
deleted file mode 100644
index 34d99f6..0000000
--- a/pkg/messages/types/svcSounds.go
+++ /dev/null
@@ -1,28 +0,0 @@
1package messages
2
3import (
4 "github.com/pektezol/bitreader"
5)
6
7type SvcSounds struct {
8 ReliableSound bool
9 SoundCount uint8
10 Length uint16
11 Data []byte
12}
13
14func ParseSvcSounds(reader *bitreader.Reader) SvcSounds {
15 svcSounds := SvcSounds{
16 ReliableSound: reader.TryReadBool(),
17 }
18 if svcSounds.ReliableSound {
19 svcSounds.SoundCount = 1
20 svcSounds.Length = uint16(reader.TryReadUInt8())
21 } else {
22 svcSounds.SoundCount = reader.TryReadUInt8()
23 svcSounds.Length = reader.TryReadUInt16()
24 }
25 svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length))
26
27 return svcSounds
28}