rattletrap 6.2.3 → 6.3.0
raw patch · 9 files changed
+20/−3 lines, 9 files
Files
- library/Rattletrap/Decode/Content.hs +2/−0
- library/Rattletrap/Decode/ProductAttribute.hs +6/−0
- library/Rattletrap/Encode/Content.hs +3/−0
- library/Rattletrap/Encode/ProductAttribute.hs +2/−0
- library/Rattletrap/Type/Content.hs +1/−0
- library/Rattletrap/Type/ProductAttribute.hs +2/−0
- package.yaml +1/−1
- rattletrap.cabal +2/−2
- tests/Main.hs +1/−0
library/Rattletrap/Decode/Content.hs view
@@ -53,6 +53,7 @@ (decodeFramesBits version numFrames maxChannels classAttributeMap) mempty frames <- either fail pure (runDecodeBits bitGet (reverseBytes stream))+ unknown <- decodeWhen (version >= (868, 24, 10)) decodeWord32le pure (Content levels@@ -66,4 +67,5 @@ names classMappings caches+ unknown )
library/Rattletrap/Decode/ProductAttribute.hs view
@@ -36,6 +36,7 @@ value <- case fromStr <$> maybeObjectName of Just "TAGame.ProductAttribute_Painted_TA" -> decodePainted version Just "TAGame.ProductAttribute_SpecialEdition_TA" -> decodeSpecialEdition+ Just "TAGame.ProductAttribute_TeamEdition_TA" -> decodeTeamEdition version Just "TAGame.ProductAttribute_TitleID_TA" -> decodeTitle Just "TAGame.ProductAttribute_UserColor_TA" -> decodeColor version Just objectName ->@@ -55,6 +56,11 @@ decodePainted version = if version >= (868, 18, 0) then ProductAttributeValuePaintedNew <$> getWord32be 31 else ProductAttributeValuePaintedOld <$> decodeCompressedWordBits 13++decodeTeamEdition :: (Int, Int, Int) -> DecodeBits ProductAttributeValue+decodeTeamEdition version = if version >= (868, 18, 0)+ then ProductAttributeValueTeamEditionNew <$> getWord32be 31+ else ProductAttributeValueTeamEditionOld <$> decodeCompressedWordBits 13 decodeColor :: (Int, Int, Int) -> DecodeBits ProductAttributeValue decodeColor version = if version >= (868, 23, 8)
library/Rattletrap/Encode/Content.hs view
@@ -40,3 +40,6 @@ putList putText (contentNames content) putList putClassMapping (contentClassMappings content) putList putCache (contentCaches content)+ case contentUnknown content of+ Nothing -> pure ()+ Just unknown -> putWord32 unknown
library/Rattletrap/Encode/ProductAttribute.hs view
@@ -25,6 +25,8 @@ case productAttributeValue attribute of ProductAttributeValuePaintedOld x -> putCompressedWord x ProductAttributeValuePaintedNew x -> BinaryBits.putWord32be 31 x+ ProductAttributeValueTeamEditionOld x -> putCompressedWord x+ ProductAttributeValueTeamEditionNew x -> BinaryBits.putWord32be 31 x ProductAttributeValueSpecialEdition x -> BinaryBits.putWord32be 31 x ProductAttributeValueUserColorOld x -> case x of Nothing -> BinaryBits.putBool False
library/Rattletrap/Type/Content.hs view
@@ -48,6 +48,7 @@ , contentCaches :: List Cache -- ^ A list of classes along with their parent classes and attributes. Used -- for the 'Rattletrap.Type.ClassAttributeMap.ClassAttributeMap'.+ , contentUnknown :: Maybe Word32le } deriving (Eq, Ord, Show) $(deriveJson ''Content)
library/Rattletrap/Type/ProductAttribute.hs view
@@ -14,6 +14,8 @@ data ProductAttributeValue = ProductAttributeValuePaintedOld CompressedWord | ProductAttributeValuePaintedNew Word32+ | ProductAttributeValueTeamEditionOld CompressedWord+ | ProductAttributeValueTeamEditionNew Word32 | ProductAttributeValueSpecialEdition Word32 | ProductAttributeValueUserColorOld (Maybe Word32) | ProductAttributeValueUserColorNew Word32le
package.yaml view
@@ -1,5 +1,5 @@ name: rattletrap-version: 6.2.3+version: 6.3.0 category: Game description: Rattletrap parses and generates Rocket League replays.
rattletrap.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 9acb7a46651ff922dacbc8d6b88a8715d6fc0847da9801b64780c23e8ce89c00+-- hash: 4951bb4cb7d0a5c9783e731db2936ee1173fc07512a57e616111bd6ec327e2ea name: rattletrap-version: 6.2.3+version: 6.3.0 synopsis: Parse and generate Rocket League replays. description: Rattletrap parses and generates Rocket League replays. category: Game
tests/Main.hs view
@@ -129,6 +129,7 @@ , ("52aa", "a match-ending attribute") , ("540d", "a demolish attribute") , ("551c", "private match settings")+ , ("5a06", "esports items") , ("6210", "different player history key") , ("6320", "a forfeit attribute") , ("6688", "a malformed byte property")