packages feed

rattletrap 2.4.0 → 2.5.0

raw patch · 3 files changed

+21/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Rattletrap.Attribute.ExtendedExplosion: [extendedExplosionAttributeUnknown] :: ExtendedExplosionAttribute -> [Word8]
- Rattletrap.Attribute.ExtendedExplosion: newtype ExtendedExplosionAttribute
+ Rattletrap.Attribute.ExtendedExplosion: [extendedExplosionAttributeActorId] :: ExtendedExplosionAttribute -> Int32
+ Rattletrap.Attribute.ExtendedExplosion: [extendedExplosionAttributeLocation] :: ExtendedExplosionAttribute -> Vector
+ Rattletrap.Attribute.ExtendedExplosion: [extendedExplosionAttributeUnknown1] :: ExtendedExplosionAttribute -> Bool
+ Rattletrap.Attribute.ExtendedExplosion: [extendedExplosionAttributeUnknown2] :: ExtendedExplosionAttribute -> Int32
+ Rattletrap.Attribute.ExtendedExplosion: data ExtendedExplosionAttribute
- Rattletrap.Attribute.ExtendedExplosion: ExtendedExplosionAttribute :: [Word8] -> ExtendedExplosionAttribute
+ Rattletrap.Attribute.ExtendedExplosion: ExtendedExplosionAttribute :: Int32 -> Vector -> Bool -> Int32 -> ExtendedExplosionAttribute

Files

library/Rattletrap/Attribute/ExtendedExplosion.hs view
@@ -2,21 +2,31 @@  import Rattletrap.Primitive -import qualified Control.Monad as Monad import qualified Data.Binary.Bits.Get as BinaryBit import qualified Data.Binary.Bits.Put as BinaryBit -newtype ExtendedExplosionAttribute = ExtendedExplosionAttribute-  { extendedExplosionAttributeUnknown :: [Word8]-  -- ^ Warning: This field should be considered experimental and could change-  -- at any time!+data ExtendedExplosionAttribute = ExtendedExplosionAttribute+  { extendedExplosionAttributeActorId :: Int32+  , extendedExplosionAttributeLocation :: Vector+  , extendedExplosionAttributeUnknown1 :: Bool+  , extendedExplosionAttributeUnknown2 :: Int32   } deriving (Eq, Ord, Show)  getExtendedExplosionAttribute :: BinaryBit.BitGet ExtendedExplosionAttribute getExtendedExplosionAttribute = do-  unknown <- Monad.replicateM 14 getWord8Bits-  pure (ExtendedExplosionAttribute unknown)+  False <- BinaryBit.getBool+  actorId <- getInt32Bits+  location <- getVector+  unknown1 <- BinaryBit.getBool+  unknown2 <- getInt32Bits+  pure (ExtendedExplosionAttribute actorId location unknown1 unknown2) -putExtendedExplosionAttribute :: ExtendedExplosionAttribute -> BinaryBit.BitPut ()+putExtendedExplosionAttribute ::+     ExtendedExplosionAttribute -> BinaryBit.BitPut () putExtendedExplosionAttribute extendedExplosionAttribute = do-  mapM_ putWord8Bits (extendedExplosionAttributeUnknown extendedExplosionAttribute)+  BinaryBit.putBool False+  putInt32Bits (extendedExplosionAttributeActorId extendedExplosionAttribute)+  putVector (extendedExplosionAttributeLocation extendedExplosionAttribute)+  BinaryBit.putBool+    (extendedExplosionAttributeUnknown1 extendedExplosionAttribute)+  putInt32Bits (extendedExplosionAttributeUnknown2 extendedExplosionAttribute)
package.yaml view
@@ -57,4 +57,4 @@     - -with-rtsopts=-N     main: Main.hs     source-dirs: tests-version: '2.4.0'+version: '2.5.0'
rattletrap.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           rattletrap-version:        2.4.0+version:        2.5.0 synopsis:       Parse and generate Rocket League replays. description:    Rattletrap parses and generates Rocket League replays. category:       Game