-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Handle replays from patch 1.50
- Loading branch information
Showing
19 changed files
with
149 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Rattletrap.Decode.Int64Attribute | ||
( decodeInt64AttributeBits | ||
) where | ||
|
||
import Rattletrap.Decode.Common | ||
import Rattletrap.Decode.Int64le | ||
import Rattletrap.Type.Int64Attribute | ||
|
||
decodeInt64AttributeBits :: DecodeBits Int64Attribute | ||
decodeInt64AttributeBits = Int64Attribute <$> decodeInt64leBits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Rattletrap.Decode.Int64le | ||
( decodeInt64le | ||
, decodeInt64leBits | ||
) where | ||
|
||
import Rattletrap.Decode.Common | ||
import Rattletrap.Type.Int64le | ||
|
||
decodeInt64le :: Decode Int64le | ||
decodeInt64le = Int64le <$> getInt64le | ||
|
||
decodeInt64leBits :: DecodeBits Int64le | ||
decodeInt64leBits = toBits decodeInt64le 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Rattletrap.Encode.Int64Attribute | ||
( putInt64Attribute | ||
) where | ||
|
||
import Rattletrap.Encode.Int64le | ||
import Rattletrap.Type.Int64Attribute | ||
|
||
import qualified Data.Binary.Bits.Put as BinaryBits | ||
|
||
putInt64Attribute :: Int64Attribute -> BinaryBits.BitPut () | ||
putInt64Attribute int64Attribute = | ||
putInt64Bits (int64AttributeValue int64Attribute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Rattletrap.Encode.Int64le | ||
( putInt64 | ||
, putInt64Bits | ||
) where | ||
|
||
import Rattletrap.Type.Int64le | ||
import Rattletrap.Utility.Bytes | ||
|
||
import qualified Data.Binary as Binary | ||
import qualified Data.Binary.Bits.Put as BinaryBits | ||
import qualified Data.Binary.Put as Binary | ||
import qualified Data.ByteString.Lazy as LazyBytes | ||
|
||
putInt64 :: Int64le -> Binary.Put | ||
putInt64 int64 = Binary.putInt64le (int64leValue int64) | ||
|
||
putInt64Bits :: Int64le -> BinaryBits.BitPut () | ||
putInt64Bits int64 = do | ||
let bytes = Binary.runPut (putInt64 int64) | ||
BinaryBits.putByteString (LazyBytes.toStrict (reverseBytes bytes)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
|
||
module Rattletrap.Type.Int64Attribute | ||
( Int64Attribute(..) | ||
) where | ||
|
||
import Rattletrap.Type.Common | ||
import Rattletrap.Type.Int64le | ||
|
||
newtype Int64Attribute = Int64Attribute | ||
{ int64AttributeValue :: Int64le | ||
} deriving (Eq, Ord, Show) | ||
|
||
$(deriveJson ''Int64Attribute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{-# LANGUAGE TemplateHaskell #-} | ||
|
||
module Rattletrap.Type.Int64le | ||
( Int64le(..) | ||
) where | ||
|
||
import Rattletrap.Type.Common | ||
|
||
newtype Int64le = Int64le | ||
{ int64leValue :: Int64 | ||
} deriving (Eq, Ord, Show) | ||
|
||
$(deriveJson ''Int64le) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters