-
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 Dropshot replays
- Loading branch information
Showing
9 changed files
with
113 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module Rattletrap.Attribute.AppliedDamage where | ||
|
||
import Rattletrap.Primitive | ||
|
||
import qualified Data.Binary.Bits.Get as BinaryBit | ||
import qualified Data.Binary.Bits.Put as BinaryBit | ||
|
||
data AppliedDamageAttribute = AppliedDamageAttribute | ||
{ appliedDamageAttributeUnknown1 :: Word8 | ||
, appliedDamageAttributeLocation :: Vector | ||
, appliedDamageAttributeUnknown3 :: Int32 | ||
, appliedDamageAttributeUnknown4 :: Int32 | ||
} deriving (Eq, Ord, Show) | ||
|
||
getAppliedDamageAttribute :: BinaryBit.BitGet AppliedDamageAttribute | ||
getAppliedDamageAttribute = do | ||
unknown1 <- getWord8Bits | ||
location <- getVector | ||
unknown3 <- getInt32Bits | ||
unknown4 <- getInt32Bits | ||
pure | ||
(AppliedDamageAttribute | ||
unknown1 | ||
location | ||
unknown3 | ||
unknown4) | ||
|
||
putAppliedDamageAttribute :: AppliedDamageAttribute -> BinaryBit.BitPut () | ||
putAppliedDamageAttribute appliedDamageAttribute = do | ||
putWord8Bits (appliedDamageAttributeUnknown1 appliedDamageAttribute) | ||
putVector (appliedDamageAttributeLocation appliedDamageAttribute) | ||
putInt32Bits (appliedDamageAttributeUnknown3 appliedDamageAttribute) | ||
putInt32Bits (appliedDamageAttributeUnknown4 appliedDamageAttribute) |
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,41 @@ | ||
module Rattletrap.Attribute.DamageState where | ||
|
||
import Rattletrap.Primitive | ||
|
||
import qualified Data.Binary.Bits.Get as BinaryBit | ||
import qualified Data.Binary.Bits.Put as BinaryBit | ||
|
||
data DamageStateAttribute = DamageStateAttribute | ||
{ damageStateAttributeUnknown1 :: Word8 | ||
, damageStateAttributeUnknown2 :: Bool | ||
, damageStateAttributeUnknown3 :: Int32 | ||
, damageStateAttributeUnknown4 :: Vector | ||
, damageStateAttributeUnknown5 :: Bool | ||
, damageStateAttributeUnknown6 :: Bool | ||
} deriving (Eq, Ord, Show) | ||
|
||
getDamageStateAttribute :: BinaryBit.BitGet DamageStateAttribute | ||
getDamageStateAttribute = do | ||
unknown1 <- getWord8Bits | ||
unknown2 <- BinaryBit.getBool | ||
unknown3 <- getInt32Bits | ||
unknown4 <- getVector | ||
unknown5 <- BinaryBit.getBool | ||
unknown6 <- BinaryBit.getBool | ||
pure | ||
(DamageStateAttribute | ||
unknown1 | ||
unknown2 | ||
unknown3 | ||
unknown4 | ||
unknown5 | ||
unknown6) | ||
|
||
putDamageStateAttribute :: DamageStateAttribute -> BinaryBit.BitPut () | ||
putDamageStateAttribute damageStateAttribute = do | ||
putWord8Bits (damageStateAttributeUnknown1 damageStateAttribute) | ||
BinaryBit.putBool (damageStateAttributeUnknown2 damageStateAttribute) | ||
putInt32Bits (damageStateAttributeUnknown3 damageStateAttribute) | ||
putVector (damageStateAttributeUnknown4 damageStateAttribute) | ||
BinaryBit.putBool (damageStateAttributeUnknown5 damageStateAttribute) | ||
BinaryBit.putBool (damageStateAttributeUnknown6 damageStateAttribute) |
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
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