diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-12 20:53:09 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:39:42 +0300 |
| commit | 82871ba1bac1d62f69e1933b66659e62d2e5e063 (patch) | |
| tree | a906310fba89b670bcfda9625a6d776553d482f6 /pkg/messages/types/svcSplitScreen.go | |
| parent | net/svc messages finally getting parsed correctly (diff) | |
| download | sdp.go-82871ba1bac1d62f69e1933b66659e62d2e5e063.tar.gz sdp.go-82871ba1bac1d62f69e1933b66659e62d2e5e063.tar.bz2 sdp.go-82871ba1bac1d62f69e1933b66659e62d2e5e063.zip | |
another rewrite, v1.0.0
Diffstat (limited to 'pkg/messages/types/svcSplitScreen.go')
| -rw-r--r-- | pkg/messages/types/svcSplitScreen.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/messages/types/svcSplitScreen.go b/pkg/messages/types/svcSplitScreen.go new file mode 100644 index 0000000..9c808bc --- /dev/null +++ b/pkg/messages/types/svcSplitScreen.go | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | package messages | ||
| 2 | |||
| 3 | import "github.com/pektezol/bitreader" | ||
| 4 | |||
| 5 | type SvcSplitScreen struct { | ||
| 6 | Unk bool | ||
| 7 | Length int16 | ||
| 8 | Data []byte | ||
| 9 | } | ||
| 10 | |||
| 11 | func ParseSvcSplitScreen(reader *bitreader.ReaderType) SvcSplitScreen { | ||
| 12 | svcSplitScreen := SvcSplitScreen{ | ||
| 13 | Unk: reader.TryReadBool(), | ||
| 14 | Length: int16(reader.TryReadBits(11)), | ||
| 15 | } | ||
| 16 | svcSplitScreen.Data = reader.TryReadBitsToSlice(int(svcSplitScreen.Length)) | ||
| 17 | return svcSplitScreen | ||
| 18 | } | ||