octane 0.17.0 → 0.18.0
raw patch · 4 files changed
+24/−55 lines, 4 filesdep ~rattletrapPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: rattletrap
API changes (from Hackage documentation)
Files
- library/Octane/Type/Replay.hs +13/−48
- octane.cabal +2/−2
- package.yaml +2/−2
- stack.yaml +7/−3
library/Octane/Type/Replay.hs view
@@ -24,7 +24,6 @@ import qualified Data.Maybe as Maybe import qualified Data.OverloadedRecords.TH as OverloadedRecords import qualified Data.Text as StrictText-import qualified Data.Text.Encoding as Encoding import qualified Data.Version as Version import qualified Octane.Type.Boolean as Boolean import qualified Octane.Type.CompressedWord as CompressedWord@@ -46,7 +45,6 @@ import qualified Octane.Type.Word32 as Word32 import qualified Octane.Type.Word64 as Word64 import qualified Octane.Type.Word8 as Word8-import qualified Octane.Utility.Endian as Endian import qualified Octane.Utility.Optimizer as Optimizer import qualified Rattletrap @@ -133,15 +131,7 @@ ] metadata = header & Rattletrap.headerProperties & Rattletrap.dictionaryValue &- Maybe.mapMaybe- (\(key, maybeValue) ->- case maybeValue of- Nothing -> Nothing- Just value ->- Just- ( key & Rattletrap.textToString & StrictText.pack- , toProperty value)) &- Map.fromList+ Map.map toProperty levels = content & Rattletrap.contentLevels & Rattletrap.listValue & map Rattletrap.textToString &@@ -196,13 +186,8 @@ x & Rattletrap.listValue & map (\y ->- y & Rattletrap.dictionaryValue &- Maybe.mapMaybe- (\(k, mv) ->- case mv of- Nothing -> Nothing- Just v -> Just (toText k, toProperty v)) &- Map.fromList &+ y & Rattletrap.dictionaryValue & Map.map toProperty &+ Map.mapKeys Text.Text & Dictionary.Dictionary) & List.List in Property.PropertyArray (Property.ArrayProperty size content)@@ -268,10 +253,10 @@ case replicationValue of Rattletrap.SpawnedReplicationValue spawned -> Just- ( spawned & Rattletrap.spawnedReplication_objectName &+ ( spawned & Rattletrap.spawnedReplicationObjectName & Rattletrap.textToString & StrictText.pack- , spawned & Rattletrap.spawnedReplication_className &+ , spawned & Rattletrap.spawnedReplicationClassName & Rattletrap.textToString & StrictText.pack) _ -> Nothing@@ -320,7 +305,7 @@ toValue :: Rattletrap.Attribute -> (StrictText.Text, Value.Value) toValue attribute = let key =- attribute & Rattletrap.attribute_name & Rattletrap.textToString &+ attribute & Rattletrap.attributeName & Rattletrap.textToString & StrictText.pack value = case Rattletrap.attributeValue attribute of@@ -523,16 +508,9 @@ toRemoteId :: Rattletrap.RemoteId -> RemoteId.RemoteId toRemoteId remoteId = case remoteId of- Rattletrap.PlayStationId x ->- let (a, b) = splitAt 16 x- in RemoteId.RemotePlayStationId- (RemoteId.PlayStationId- (a & LazyBytes.pack & LazyBytes.toStrict &- Endian.reverseBitsInStrictBytes &- Encoding.decodeLatin1 &- StrictText.dropWhileEnd (== '\0') &- Text.Text)- (LazyBytes.pack b))+ Rattletrap.PlayStationId a b ->+ RemoteId.RemotePlayStationId+ (RemoteId.PlayStationId (Text.Text a) (LazyBytes.pack b)) Rattletrap.SplitscreenId _ -> RemoteId.RemoteSplitscreenId (RemoteId.SplitscreenId (Just 0)) Rattletrap.SteamId x ->@@ -550,23 +528,10 @@ toIntVector :: Rattletrap.Vector -> Vector.Vector Int toIntVector vector =- let numBits =- vector & Rattletrap.vectorBitSize & Rattletrap.compressedWordValue &- fromIntegral- bias = Bits.shiftL 1 (numBits + 1)- dx =- vector & Rattletrap.vectorDx & Rattletrap.compressedWordValue &- fromIntegral- dy =- vector & Rattletrap.vectorDy & Rattletrap.compressedWordValue &- fromIntegral- dz =- vector & Rattletrap.vectorDz & Rattletrap.compressedWordValue &- fromIntegral- x = dx - bias- y = dy - bias- z = dz - bias- in Vector.Vector x y z+ Vector.Vector+ (vector & Rattletrap.vectorX)+ (vector & Rattletrap.vectorY)+ (vector & Rattletrap.vectorZ) toInt8Vector :: Rattletrap.Int8Vector -> Vector.Vector Int8.Int8 toInt8Vector vector =
octane.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack name: octane-version: 0.17.0+version: 0.18.0 synopsis: Parse Rocket League replays. description: Octane parses Rocket League replays. category: Game@@ -41,7 +41,7 @@ , data-default-class <0.2 , file-embed ==0.0.* , overloaded-records ==0.4.*- , rattletrap ==1.0.*+ , rattletrap ==2.0.* , text ==1.2.* exposed-modules: Octane
package.yaml view
@@ -35,7 +35,7 @@ - data-default-class <0.2 - file-embed ==0.0.* - overloaded-records ==0.4.*- - rattletrap ==1.0.*+ - rattletrap ==2.0.* - text ==1.2.* other-modules: Paths_octane source-dirs: library@@ -44,4 +44,4 @@ maintainer: Taylor Fausak name: octane synopsis: Parse Rocket League replays.-version: '0.17.0'+version: '0.18.0'
stack.yaml view
@@ -1,3 +1,7 @@-extra-deps:-- rattletrap-1.0.0-resolver: lts-7.8+packages:+- .+- extra-dep: true+ location:+ commit: 2.0.0+ git: https://github.com/tfausak/rattletrap+resolver: lts-7.10