diff options
| author | BiSaXa <1669855+BiSaXa@users.noreply.github.com> | 2022-08-28 18:46:20 +0300 |
|---|---|---|
| committer | BiSaXa <1669855+BiSaXa@users.noreply.github.com> | 2022-08-28 18:46:20 +0300 |
| commit | bb3801544a0ed1f47c7074649c81f638b48d2f25 (patch) | |
| tree | 055d5fc4cb71d980686dc5e45925c0f6185a1541 /classes | |
| parent | Update and rename go-windows-amd64.yml to CI.yml (diff) | |
| download | sdp.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.go | 2 | ||||
| -rw-r--r-- | classes/userCmdInfo.go | 15 |
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 @@ | |||
| 1 | package classes | 1 | package classes |
| 2 | 2 | ||
| 3 | import "parser/utils" | 3 | import "github.com/bisaxa/demoparser/utils" |
| 4 | 4 | ||
| 5 | type CmdInfo struct { | 5 | type 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 @@ | |||
| 1 | package classes | 1 | package classes |
| 2 | 2 | ||
| 3 | import ( | ||
| 4 | "fmt" | ||
| 5 | |||
| 6 | "github.com/bisaxa/demoparser/utils" | ||
| 7 | ) | ||
| 8 | |||
| 3 | type UserCmdInfo struct { | 9 | type 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 | ||
| 20 | func 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 | /* |
| 15 | func UserCmdInfoInit(byteArr []byte, size int) (output UserCmdInfo) { | 30 | func UserCmdInfoInit(byteArr []byte, size int) (output UserCmdInfo) { |
| 16 | var class UserCmdInfo | 31 | var class UserCmdInfo |