diff --git a/main.go b/main.go index 6b4b776..df9c36e 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,7 @@ package main +//go:generate ./mkprotos + import ( "compress/bzip2" "flag" diff --git a/message.go b/message.go index 5b3f178..8f6acba 100644 --- a/message.go +++ b/message.go @@ -9,6 +9,9 @@ import ( "github.com/jordanorelli/hyperstone/dota" ) +// message represents the top-level envelope in the dota replay format. Each +// datum is contained within a message envelope. Each message envelope is at +// most 1<<16 bytes. type message struct { cmd dota.EDemoCommands tick int64 diff --git a/mkprotos b/mkprotos index e503693..6a29b15 100755 --- a/mkprotos +++ b/mkprotos @@ -6,6 +6,9 @@ echo "Did you update the GameTracking submodule? You want to do that." echo "clearing existing proto files in ./dota" rm dota/*.proto +echo "clearing existing generated go files in ./dota" +rm dota/*.pb.go + echo "copying protos from GameTracking/Protobufs/dota" cp GameTracking/Protobufs/dota/*.proto ./dota