aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBiSaXa <1669855+BiSaXa@users.noreply.github.com>2022-08-28 18:46:20 +0300
committerBiSaXa <1669855+BiSaXa@users.noreply.github.com>2022-08-28 18:46:20 +0300
commitbb3801544a0ed1f47c7074649c81f638b48d2f25 (patch)
tree055d5fc4cb71d980686dc5e45925c0f6185a1541 /classes
parentUpdate and rename go-windows-amd64.yml to CI.yml (diff)
downloadsdp.go-bb3801544a0ed1f47c7074649c81f638b48d2f25.tar.gz
sdp.go-bb3801544a0ed1f47c7074649c81f638b48d2f25.tar.bz2
sdp.go-bb3801544a0ed1f47c7074649c81f638b48d2f25.zip
module name and other changes
Diffstat (limited to 'classes')
-rw-r--r--classes/cmdInfo.go2
-rw-r--r--classes/userCmdInfo.go15
2 files changed, 16 insertions, 1 deletions
diff --git a/classes/cmdInfo.go b/classes/cmdInfo.go
index c1faadd..7e7e1bc 100644
--- a/classes/cmdInfo.go
+++ b/classes/cmdInfo.go
@@ -1,6 +1,6 @@
1package classes 1package classes
2 2
3import "parser/utils" 3import "github.com/bisaxa/demoparser/utils"
4 4
5type CmdInfo struct { 5type CmdInfo struct {
6 Flags int32 6 Flags int32
diff --git a/classes/userCmdInfo.go b/classes/userCmdInfo.go
index aae1804..a85a495 100644
--- a/classes/userCmdInfo.go
+++ b/classes/userCmdInfo.go
@@ -1,5 +1,11 @@
1package classes 1package classes
2 2
3import (
4 "fmt"
5
6 "github.com/bisaxa/demoparser/utils"
7)
8
3type UserCmdInfo struct { 9type UserCmdInfo struct {
4 CommandNumber int32 10 CommandNumber int32
5 TickCount int32 11 TickCount int32
@@ -11,6 +17,15 @@ type UserCmdInfo struct {
11 UpMove float32 17 UpMove float32
12} 18}
13 19
20func UserCmdInfoInit(byteArr []byte, size int32) (output UserCmdInfo) {
21 var class UserCmdInfo
22 if utils.ReadBitsFromReversedByteArray1(byteArr) {
23 class.CommandNumber = int32(utils.ReadBitsFromReversedByteArray16(byteArr, 15))
24 fmt.Printf("%b\n", class.CommandNumber)
25 }
26 return class
27}
28
14/* 29/*
15func UserCmdInfoInit(byteArr []byte, size int) (output UserCmdInfo) { 30func UserCmdInfoInit(byteArr []byte, size int) (output UserCmdInfo) {
16 var class UserCmdInfo 31 var class UserCmdInfo