rattletrap 9.0.10 → 9.1.0
raw patch · 12 files changed
+77/−66 lines, 12 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.markdown +3/−3
- rattletrap.cabal +1/−1
- source/library/Rattletrap/Data.hs +54/−46
- source/library/Rattletrap/Decode/Attribute.hs +3/−3
- source/library/Rattletrap/Decode/AttributeValue.hs +1/−1
- source/library/Rattletrap/Decode/ProductAttribute.hs +2/−2
- source/library/Rattletrap/Decode/PropertyValue.hs +1/−1
- source/library/Rattletrap/Decode/Quaternion.hs +1/−1
- source/library/Rattletrap/Decode/RemoteId.hs +1/−1
- source/library/Rattletrap/Decode/Section.hs +1/−1
- source/library/Rattletrap/Decode/SpawnedReplication.hs +3/−3
- source/test-suite/Main.hs +6/−3
README.markdown view
@@ -11,8 +11,8 @@ can be used to modify replays in order to force everyone into the same car or change the map a game was played on. -Rattletrap supports every version of Rocket League up to [1.68][], which was-released on 2019-10-14. If a replay can be played by the Rocket League client,+Rattletrap supports every version of Rocket League up to [1.76][], which was+released on 2020-04-15. If a replay can be played by the Rocket League client, it can be parsed by Rattletrap. (If not, that's a bug. Please report it!) Rattletrap is a command-line application. You should only use it if you're@@ -134,7 +134,7 @@ [Docker build badge]: https://img.shields.io/docker/build/taylorfausak/rattletrap.svg?label=docker&logo=docker&logoColor=white [docker build]: https://hub.docker.com/r/taylorfausak/rattletrap [Rocket League]: https://www.rocketleague.com-[1.68]: https://www.rocketleague.com/news/patch-notes-v1-68-october-update/+[1.76]: https://www.rocketleague.com/news/patch-notes-v1-76/ [Ball Chasing]: https://ballchasing.com [Haskell]: https://www.haskell.org [C# parser]: https://github.com/jjbott/RocketLeagueReplayParser
rattletrap.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: rattletrap-version: 9.0.10+version: 9.1.0 category: Game description: Rattletrap parses and generates Rocket League replays.
source/library/Rattletrap/Data.hs view
@@ -23,6 +23,8 @@ , ("ProjectX.GRI_X", "Engine.GameReplicationInfo") , ("ProjectX.Pawn_X", "Engine.Pawn") , ("ProjectX.PRI_X", "Engine.PlayerReplicationInfo")+ , ("TAGame.Ball_God_TA", "TAGame.Ball_TA")+ , ("TAGame.Ball_Haunted_TA", "TAGame.Ball_TA") , ("TAGame.Ball_TA", "TAGame.RBActor_TA") , ("TAGame.CameraSettingsActor_TA", "Engine.ReplicationInfo") , ("TAGame.Car_Season_TA", "TAGame.PRI_TA")@@ -35,6 +37,7 @@ , ("TAGame.CarComponent_TA", "Engine.ReplicationInfo") , ("TAGame.CrowdActor_TA", "Engine.ReplicationInfo") , ("TAGame.CrowdManager_TA", "Engine.ReplicationInfo")+ , ("TAGame.GameEvent_GodBall_TA", "TAGame.GameEvent_Soccar_TA") , ("TAGame.GameEvent_Season_TA", "TAGame.GameEvent_Soccar_TA") , ("TAGame.GameEvent_Soccar_TA", "TAGame.GameEvent_Team_TA") , ("TAGame.GameEvent_SoccarPrivate_TA", "TAGame.GameEvent_Soccar_TA")@@ -42,6 +45,7 @@ , ("TAGame.GameEvent_TA", "Engine.ReplicationInfo") , ("TAGame.GameEvent_Team_TA", "TAGame.GameEvent_TA") , ("TAGame.GRI_TA", "ProjectX.GRI_X")+ , ("TAGame.HauntedBallTrapTrigger_TA", "Engine.Actor") , ("TAGame.InMapScoreboard_TA", "Engine.Actor") , ("TAGame.PRI_TA", "ProjectX.PRI_X") , ("TAGame.RBActor_TA", "ProjectX.Pawn_X")@@ -53,13 +57,14 @@ , ("TAGame.SpecialPickup_Batarang_TA", "TAGame.SpecialPickup_BallLasso_TA") , ("TAGame.SpecialPickup_BoostOverride_TA", "TAGame.SpecialPickup_Targeted_TA") , ("TAGame.SpecialPickup_GrapplingHook_TA", "TAGame.SpecialPickup_Targeted_TA")+ , ("TAGame.SpecialPickup_HauntedBallBeam_TA", "TAGame.SpecialPickup_TA") , ("TAGame.SpecialPickup_HitForce_TA", "TAGame.SpecialPickup_TA")+ , ("TAGame.SpecialPickup_Rugby_TA", "TAGame.SpecialPickup_TA") , ("TAGame.SpecialPickup_Spring_TA", "TAGame.SpecialPickup_Targeted_TA") , ("TAGame.SpecialPickup_Swapper_TA", "TAGame.SpecialPickup_Targeted_TA") , ("TAGame.SpecialPickup_TA", "TAGame.CarComponent_TA") , ("TAGame.SpecialPickup_Targeted_TA", "TAGame.SpecialPickup_TA") , ("TAGame.SpecialPickup_Tornado_TA", "TAGame.SpecialPickup_TA")- , ("TAGame.SpecialPickup_HauntedBallBeam_TA", "TAGame.SpecialPickup_TA") , ("TAGame.Team_Soccar_TA", "TAGame.Team_TA") , ("TAGame.Team_TA", "Engine.TeamInfo") , ("TAGame.Vehicle_TA", "TAGame.RBActor_TA")@@ -69,29 +74,32 @@ rawClassesWithLocation :: [String] rawClassesWithLocation =- [ "TAGame.Ball_Breakout_TA"- , "Archetypes.Ball.Ball_Breakout"- , "TAGame.Ball_TA"- , "Archetypes.Ball.Ball_BasketBall_Mutator"- , "Archetypes.Ball.Ball_BasketBall"+ [ "Archetypes.Ball.Ball_BasketBall_Mutator" , "Archetypes.Ball.Ball_Basketball"+ , "Archetypes.Ball.Ball_BasketBall"+ , "Archetypes.Ball.Ball_Breakout" , "Archetypes.Ball.Ball_Default" , "Archetypes.Ball.Ball_Puck" , "Archetypes.Ball.CubeBall"- , "Archetypes.Ball.Ball_Haunted"- , "TAGame.Ball_Haunted_TA"- , "TAGame.Car_Season_TA"- , "TAGame.Car_TA" , "Archetypes.Car.Car_Default" , "Archetypes.GameEvent.GameEvent_Season:CarArchetype"- , "Archetypes.SpecialPickups.SpecialPickup_HauntedBallBeam" , "Archetypes.SpecialPickups.SpecialPickup_Rugby"+ , "ProjectX.NetModeReplicator"+ , "TAGame.Ball_Breakout_TA"+ , "TAGame.Ball_God_TA"+ , "TAGame.Ball_Haunted_TA"+ , "TAGame.Ball_TA" , "TAGame.CameraSettingsActor_TA"+ , "TAGame.Car_Season_TA"+ , "TAGame.Car_TA" , "TAGame.CarComponent_Boost_TA" , "TAGame.CarComponent_Dodge_TA" , "TAGame.CarComponent_DoubleJump_TA" , "TAGame.CarComponent_FlipCar_TA" , "TAGame.CarComponent_Jump_TA"+ , "TAGame.Default__CameraSettingsActor_TA"+ , "TAGame.Default__PRI_TA"+ , "TAGame.GameEvent_GodBall_TA" , "TAGame.GameEvent_Season_TA" , "TAGame.GameEvent_Soccar_TA" , "TAGame.GameEvent_SoccarPrivate_TA"@@ -106,54 +114,51 @@ , "TAGame.SpecialPickup_Batarang_TA" , "TAGame.SpecialPickup_BoostOverride_TA" , "TAGame.SpecialPickup_GrapplingHook_TA"+ , "TAGame.SpecialPickup_HauntedBallBeam_TA" , "TAGame.SpecialPickup_HitForce_TA"+ , "TAGame.SpecialPickup_Rugby_TA" , "TAGame.SpecialPickup_Swapper_TA" , "TAGame.SpecialPickup_Tornado_TA" , "TAGame.Team_Soccar_TA"- , "TAGame.Default__CameraSettingsActor_TA"- , "TAGame.Default__PRI_TA" , "TheWorld:PersistentLevel.BreakOutActor_Platform_TA" , "TheWorld:PersistentLevel.CrowdActor_TA" , "TheWorld:PersistentLevel.CrowdManager_TA" , "TheWorld:PersistentLevel.InMapScoreboard_TA" , "TheWorld:PersistentLevel.VehiclePickup_Boost_TA"- , "TAGame.HauntedBallTrapTrigger_TA"- , "ProjectX.NetModeReplicator" ] rawClassesWithRotation :: [String] rawClassesWithRotation =- [ "TAGame.Ball_Breakout_TA"- , "Archetypes.Ball.Ball_Breakout"- , "TAGame.Ball_TA"- , "Archetypes.Ball.Ball_BasketBall_Mutator"- , "Archetypes.Ball.Ball_BasketBall"+ [ "Archetypes.Ball.Ball_BasketBall_Mutator" , "Archetypes.Ball.Ball_Basketball"+ , "Archetypes.Ball.Ball_BasketBall"+ , "Archetypes.Ball.Ball_Breakout" , "Archetypes.Ball.Ball_Default" , "Archetypes.Ball.Ball_Puck" , "Archetypes.Ball.CubeBall"- , "Archetypes.Ball.Ball_Haunted"- , "TAGame.Ball_Haunted_TA"- , "TAGame.Car_Season_TA"- , "TAGame.Car_TA" , "Archetypes.Car.Car_Default" , "Archetypes.GameEvent.GameEvent_Season:CarArchetype"- , "Archetypes.SpecialPickups.SpecialPickup_HauntedBallBeam" , "Archetypes.SpecialPickups.SpecialPickup_Rugby"- -- This comments forces Brittany to use a multi-line layout for this list.+ , "TAGame.Ball_Breakout_TA"+ , "TAGame.Ball_God_TA"+ , "TAGame.Ball_Haunted_TA"+ , "TAGame.Ball_TA"+ , "TAGame.Car_Season_TA"+ , "TAGame.Car_TA" ] rawObjectClasses :: [(String, String)] rawObjectClasses =- [ ("Archetypes.Ball.Ball_BasketBall_Mutator", "TAGame.Ball_TA")+ [ ("Archetypes.Ball.Ball_Anniversary", "TAGame.Ball_TA")+ , ("Archetypes.Ball.Ball_BasketBall_Mutator", "TAGame.Ball_TA") , ("Archetypes.Ball.Ball_Basketball", "TAGame.Ball_TA") , ("Archetypes.Ball.Ball_BasketBall", "TAGame.Ball_TA") , ("Archetypes.Ball.Ball_Beachball", "TAGame.Ball_TA") , ("Archetypes.Ball.Ball_Breakout", "TAGame.Ball_Breakout_TA") , ("Archetypes.Ball.Ball_Default", "TAGame.Ball_TA")+ , ("Archetypes.Ball.Ball_God", "TAGame.Ball_God_TA") , ("Archetypes.Ball.Ball_Haunted", "TAGame.Ball_Haunted_TA") , ("Archetypes.Ball.Ball_Puck", "TAGame.Ball_TA")- , ("Archetypes.Ball.Ball_Anniversary", "TAGame.Ball_TA") , ("Archetypes.Ball.CubeBall", "TAGame.Ball_TA") , ("Archetypes.Car.Car_Default", "TAGame.Car_TA") , ("Archetypes.CarComponents.CarComponent_Boost", "TAGame.CarComponent_Boost_TA")@@ -169,8 +174,8 @@ , ("Archetypes.GameEvent.GameEvent_HockeyPrivate", "TAGame.GameEvent_SoccarPrivate_TA") , ("Archetypes.GameEvent.GameEvent_HockeySplitscreen", "TAGame.GameEvent_SoccarSplitscreen_TA") , ("Archetypes.GameEvent.GameEvent_Items", "TAGame.GameEvent_Soccar_TA")- , ("Archetypes.GameEvent.GameEvent_Season", "TAGame.GameEvent_Season_TA") , ("Archetypes.GameEvent.GameEvent_Season:CarArchetype", "TAGame.Car_TA")+ , ("Archetypes.GameEvent.GameEvent_Season", "TAGame.GameEvent_Season_TA") , ("Archetypes.GameEvent.GameEvent_Soccar", "TAGame.GameEvent_Soccar_TA") , ("Archetypes.GameEvent.GameEvent_SoccarLan", "TAGame.GameEvent_Soccar_TA") , ("Archetypes.GameEvent.GameEvent_SoccarPrivate", "TAGame.GameEvent_SoccarPrivate_TA")@@ -184,19 +189,23 @@ , ("Archetypes.SpecialPickups.SpecialPickup_BoostOverride", "TAGame.SpecialPickup_BoostOverride_TA") , ("Archetypes.SpecialPickups.SpecialPickup_CarSpring", "TAGame.SpecialPickup_BallCarSpring_TA") , ("Archetypes.SpecialPickups.SpecialPickup_GravityWell", "TAGame.SpecialPickup_BallGravity_TA")+ , ("Archetypes.SpecialPickups.SpecialPickup_HauntedBallBeam", "TAGame.SpecialPickup_HauntedBallBeam_TA")+ , ("Archetypes.SpecialPickups.SpecialPickup_Rugby", "TAGame.SpecialPickup_Rugby_TA") , ("Archetypes.SpecialPickups.SpecialPickup_StrongHit", "TAGame.SpecialPickup_HitForce_TA") , ("Archetypes.SpecialPickups.SpecialPickup_Swapper", "TAGame.SpecialPickup_Swapper_TA") , ("Archetypes.SpecialPickups.SpecialPickup_Tornado", "TAGame.SpecialPickup_Tornado_TA")- , ("Archetypes.SpecialPickups.SpecialPickup_HauntedBallBeam", "TAGame.SpecialPickup_HauntedBallBeam_TA")- , ("Archetypes.SpecialPickups.SpecialPickup_Rugby", "TAGame.SpecialPickup_Rugby_TA") , ("Archetypes.Teams.Team0", "TAGame.Team_Soccar_TA") , ("Archetypes.Teams.Team1", "TAGame.Team_Soccar_TA") , ("GameInfo_Basketball.GameInfo.GameInfo_Basketball:GameReplicationInfoArchetype", "TAGame.GRI_TA") , ("GameInfo_Breakout.GameInfo.GameInfo_Breakout:GameReplicationInfoArchetype", "TAGame.GRI_TA")+ , ("gameinfo_godball.GameInfo.gameinfo_godball:Archetype", "TAGame.GameEvent_GodBall_TA")+ , ("gameinfo_godball.GameInfo.gameinfo_godball:GameReplicationInfoArchetype", "TAGame.GRI_TA") , ("Gameinfo_Hockey.GameInfo.Gameinfo_Hockey:GameReplicationInfoArchetype", "TAGame.GRI_TA") , ("GameInfo_Items.GameInfo.GameInfo_Items:GameReplicationInfoArchetype", "TAGame.GRI_TA") , ("GameInfo_Season.GameInfo.GameInfo_Season:GameReplicationInfoArchetype", "TAGame.GRI_TA") , ("GameInfo_Soccar.GameInfo.GameInfo_Soccar:GameReplicationInfoArchetype", "TAGame.GRI_TA")+ , ("Haunted_TrainStation_P.TheWorld:PersistentLevel.HauntedBallTrapTrigger_TA_0", "TAGame.HauntedBallTrapTrigger_TA")+ , ("Haunted_TrainStation_P.TheWorld:PersistentLevel.HauntedBallTrapTrigger_TA_1", "TAGame.HauntedBallTrapTrigger_TA") , ("ProjectX.Default__NetModeReplicator_X", "ProjectX.NetModeReplicator") , ("TAGame.Default__CameraSettingsActor_TA", "TAGame.CameraSettingsActor_TA") , ("TAGame.Default__PRI_TA", "TAGame.PRI_TA")@@ -205,8 +214,6 @@ , ("TheWorld:PersistentLevel.CrowdManager_TA", "TAGame.CrowdManager_TA") , ("TheWorld:PersistentLevel.InMapScoreboard_TA", "TAGame.InMapScoreboard_TA") , ("TheWorld:PersistentLevel.VehiclePickup_Boost_TA", "TAGame.VehiclePickup_Boost_TA")- , ("Haunted_TrainStation_P.TheWorld:PersistentLevel.HauntedBallTrapTrigger_TA_1", "TAGame.HauntedBallTrapTrigger_TA")- , ("Haunted_TrainStation_P.TheWorld:PersistentLevel.HauntedBallTrapTrigger_TA_0", "TAGame.HauntedBallTrapTrigger_TA") ] rawAttributeTypes :: [(String, AttributeType)]@@ -243,6 +250,12 @@ , ("TAGame.Ball_Breakout_TA:AppliedDamage", AttributeTypeAppliedDamage) , ("TAGame.Ball_Breakout_TA:DamageIndex", AttributeTypeInt) , ("TAGame.Ball_Breakout_TA:LastTeamTouch", AttributeTypeByte)+ , ("TAGame.Ball_God_TA:TargetSpeed", AttributeTypeFloat)+ , ("TAGame.Ball_Haunted_TA:bIsBallBeamed", AttributeTypeBoolean)+ , ("TAGame.Ball_Haunted_TA:DeactivatedGoalIndex", AttributeTypeByte)+ , ("TAGame.Ball_Haunted_TA:LastTeamTouch", AttributeTypeByte)+ , ("TAGame.Ball_Haunted_TA:ReplicatedBeamBrokenValue", AttributeTypeByte)+ , ("TAGame.Ball_Haunted_TA:TotalActiveBeams", AttributeTypeByte) , ("TAGame.Ball_TA:GameEvent", AttributeTypeFlaggedInt) , ("TAGame.Ball_TA:HitTeamNum", AttributeTypeByte) , ("TAGame.Ball_TA:ReplicatedAddedCarBounceScale", AttributeTypeFloat)@@ -253,8 +266,8 @@ , ("TAGame.Ball_TA:ReplicatedPhysMatOverride", AttributeTypeFlaggedInt) , ("TAGame.Ball_TA:ReplicatedWorldBounceScale", AttributeTypeFloat) , ("TAGame.BreakOutActor_Platform_TA:DamageState", AttributeTypeDamageState)- , ("TAGame.CameraSettingsActor_TA:bUsingBehindView", AttributeTypeBoolean) , ("TAGame.CameraSettingsActor_TA:bMouseCameraToggleEnabled", AttributeTypeBoolean)+ , ("TAGame.CameraSettingsActor_TA:bUsingBehindView", AttributeTypeBoolean) , ("TAGame.CameraSettingsActor_TA:bUsingSecondaryCamera", AttributeTypeBoolean) , ("TAGame.CameraSettingsActor_TA:bUsingSwivel", AttributeTypeBoolean) , ("TAGame.CameraSettingsActor_TA:CameraPitch", AttributeTypeByte)@@ -314,12 +327,12 @@ , ("TAGame.GameEvent_Team_TA:bForfeit", AttributeTypeBoolean) , ("TAGame.GameEvent_Team_TA:MaxTeamSize", AttributeTypeInt) , ("TAGame.GRI_TA:NewDedicatedServerIP", AttributeTypeString)+ , ("TAGame.PRI_TA:bIsDistracted", AttributeTypeBoolean) , ("TAGame.PRI_TA:bIsInSplitScreen", AttributeTypeBoolean) , ("TAGame.PRI_TA:bMatchMVP", AttributeTypeBoolean) , ("TAGame.PRI_TA:bOnlineLoadoutSet", AttributeTypeBoolean) , ("TAGame.PRI_TA:bOnlineLoadoutsSet", AttributeTypeBoolean) , ("TAGame.PRI_TA:BotProductName", AttributeTypeInt)- , ("TAGame.PRI_TA:bIsDistracted", AttributeTypeBoolean) , ("TAGame.PRI_TA:bReady", AttributeTypeBoolean) , ("TAGame.PRI_TA:bUsingBehindView", AttributeTypeBoolean) , ("TAGame.PRI_TA:bUsingItems", AttributeTypeBoolean)@@ -344,16 +357,16 @@ , ("TAGame.PRI_TA:PersistentCamera", AttributeTypeFlaggedInt) , ("TAGame.PRI_TA:PlayerHistoryKey", AttributeTypePlayerHistoryKey) , ("TAGame.PRI_TA:PlayerHistoryValid", AttributeTypeBoolean)+ , ("TAGame.PRI_TA:PrimaryTitle", AttributeTypeTitle) , ("TAGame.PRI_TA:ReplicatedGameEvent", AttributeTypeFlaggedInt) , ("TAGame.PRI_TA:ReplicatedWorstNetQualityBeyondLatency", AttributeTypeByte)- , ("TAGame.PRI_TA:SteeringSensitivity", AttributeTypeFloat)+ , ("TAGame.PRI_TA:SecondaryTitle", AttributeTypeTitle) , ("TAGame.PRI_TA:SkillTier", AttributeTypeFlaggedByte)+ , ("TAGame.PRI_TA:SpectatorShortcut", AttributeTypeInt)+ , ("TAGame.PRI_TA:SteeringSensitivity", AttributeTypeFloat) , ("TAGame.PRI_TA:TimeTillItem", AttributeTypeInt) , ("TAGame.PRI_TA:Title", AttributeTypeInt) , ("TAGame.PRI_TA:TotalXP", AttributeTypeInt)- , ("TAGame.PRI_TA:PrimaryTitle", AttributeTypeTitle)- , ("TAGame.PRI_TA:SecondaryTitle", AttributeTypeTitle)- , ("TAGame.PRI_TA:SpectatorShortcut", AttributeTypeInt) , ("TAGame.RBActor_TA:bFrozen", AttributeTypeBoolean) , ("TAGame.RBActor_TA:bIgnoreSyncing", AttributeTypeBoolean) , ("TAGame.RBActor_TA:bReplayActor", AttributeTypeBoolean)@@ -364,6 +377,7 @@ , ("TAGame.SpecialPickup_BallVelcro_TA:bBroken", AttributeTypeBoolean) , ("TAGame.SpecialPickup_BallVelcro_TA:bHit", AttributeTypeBoolean) , ("TAGame.SpecialPickup_BallVelcro_TA:BreakTime", AttributeTypeFloat)+ , ("TAGame.SpecialPickup_Rugby_TA:bBallWelded", AttributeTypeBoolean) , ("TAGame.SpecialPickup_Targeted_TA:Targeted", AttributeTypeFlaggedInt) , ("TAGame.Team_Soccar_TA:GameScore", AttributeTypeInt) , ("TAGame.Team_TA:ClubColors", AttributeTypeClubColors)@@ -376,14 +390,8 @@ , ("TAGame.Vehicle_TA:ReplicatedSteer", AttributeTypeByte) , ("TAGame.Vehicle_TA:ReplicatedThrottle", AttributeTypeByte) , ("TAGame.VehiclePickup_TA:bNoPickup", AttributeTypeBoolean)- , ("TAGame.VehiclePickup_TA:ReplicatedPickupData", AttributeTypePickup) , ("TAGame.VehiclePickup_TA:NewReplicatedPickupData", AttributeTypePickupNew)- , ("TAGame.Ball_Haunted_TA:LastTeamTouch", AttributeTypeByte)- , ("TAGame.Ball_Haunted_TA:TotalActiveBeams", AttributeTypeByte)- , ("TAGame.Ball_Haunted_TA:DeactivatedGoalIndex", AttributeTypeByte)- , ("TAGame.Ball_Haunted_TA:ReplicatedBeamBrokenValue", AttributeTypeByte)- , ("TAGame.Ball_Haunted_TA:bIsBallBeamed", AttributeTypeBoolean)- , ("TAGame.SpecialPickup_Rugby_TA:bBallWelded", AttributeTypeBoolean)+ , ("TAGame.VehiclePickup_TA:ReplicatedPickupData", AttributeTypePickup) ] rawCrc32Table :: Integral a => [a]
source/library/Rattletrap/Decode/Attribute.hs view
@@ -51,13 +51,13 @@ -> CompressedWord -> DecodeBits (Map Word32le Word32le) lookupAttributeMap classes actors actor = fromMaybe- ("could not get attribute map for " <> show actor)+ ("[RT01] could not get attribute map for " <> show actor) (getAttributeMap classes actors actor) lookupAttributeIdLimit :: Map Word32le Word32le -> CompressedWord -> DecodeBits Word lookupAttributeIdLimit attributes actor = fromMaybe- ("could not get attribute ID limit for " <> show actor)+ ("[RT02] could not get attribute ID limit for " <> show actor) (getAttributeIdLimit attributes) lookupAttributeName@@ -66,7 +66,7 @@ -> CompressedWord -> DecodeBits Str lookupAttributeName classes attributes attribute = fromMaybe- ("could not get attribute name for " <> show attribute)+ ("[RT03] could not get attribute name for " <> show attribute) (getAttributeName classes attributes attribute) fromMaybe :: String -> Maybe a -> DecodeBits a
source/library/Rattletrap/Decode/AttributeValue.hs view
@@ -53,7 +53,7 @@ :: (Int, Int, Int) -> Map Word32le Str -> Str -> DecodeBits AttributeValue decodeAttributeValueBits version objectMap name = do constructor <- maybe- (fail ("don't know how to get attribute value " <> show name))+ (fail ("[RT04] don't know how to get attribute value " <> show name)) pure (Map.lookup name attributeTypes) case constructor of
source/library/Rattletrap/Decode/ProductAttribute.hs view
@@ -39,12 +39,12 @@ Just "TAGame.ProductAttribute_UserColor_TA" -> decodeColor version Just objectName -> fail- ("unknown object name "+ ("[RT05] unknown object name " <> show objectName <> " for ID " <> show objectId )- Nothing -> fail ("missing object name for ID " <> show objectId)+ Nothing -> fail ("[RT06] missing object name for ID " <> show objectId) pure (ProductAttribute flag objectId maybeObjectName value) decodeSpecialEdition :: DecodeBits ProductAttributeValue
source/library/Rattletrap/Decode/PropertyValue.hs view
@@ -28,4 +28,4 @@ "NameProperty" -> PropertyValueName <$> decodeStr "QWordProperty" -> PropertyValueQWord <$> decodeWord64le "StrProperty" -> PropertyValueStr <$> decodeStr- _ -> fail ("don't know how to read property value " <> show kind)+ _ -> fail ("[RT07] don't know how to read property value " <> show kind)
source/library/Rattletrap/Decode/Quaternion.hs view
@@ -20,7 +20,7 @@ 1 -> pure ComponentY 2 -> pure ComponentZ 3 -> pure ComponentW- y -> fail ("invalid component: " <> show y)+ y -> fail ("[RT08] invalid component: " <> show y) decodePart :: DecodeBits Double decodePart = decompressPart <$> decodeCompressedWordBits maxCompressedValue
source/library/Rattletrap/Decode/RemoteId.hs view
@@ -27,7 +27,7 @@ 7 -> if version >= (868, 24, 10) then RemoteIdPsyNet . Left <$> decodeWord64leBits else RemoteIdPsyNet . Right <$> getWord256- _ -> fail ("unknown system id " <> show systemId)+ _ -> fail ("[RT09] unknown system id " <> show systemId) decodePsName :: DecodeBits Text.Text decodePsName = fmap
source/library/Rattletrap/Decode/Section.hs view
@@ -23,4 +23,4 @@ crcMessage :: Word32le -> Word32le -> String crcMessage actual expected = unwords- ["actual CRC", show actual, "does not match expected CRC", show expected]+ ["[RT10] actual CRC", show actual, "does not match expected CRC", show expected]
source/library/Rattletrap/Decode/SpawnedReplication.hs view
@@ -54,16 +54,16 @@ Nothing -> Right Nothing Just nameIndex -> case getName (classAttributeMapNameMap classAttributeMap) nameIndex of- Nothing -> Left ("could not get name for index " <> show nameIndex)+ Nothing -> Left ("[RT11] could not get name for index " <> show nameIndex) Just name -> Right (Just name) lookupObjectName :: ClassAttributeMap -> Word32le -> Either String Str lookupObjectName classAttributeMap objectId = case getObjectName (classAttributeMapObjectMap classAttributeMap) objectId of- Nothing -> Left ("could not get object name for id " <> show objectId)+ Nothing -> Left ("[RT12] could not get object name for id " <> show objectId) Just objectName -> Right objectName lookupClassName :: Str -> Either String Str lookupClassName objectName = case getClassName objectName of- Nothing -> Left ("could not get class name for object " <> show objectName)+ Nothing -> Left ("[RT13] could not get class name for object " <> show objectName) Just className -> Right className
source/test-suite/Main.hs view
@@ -95,9 +95,7 @@ replays :: [(String, String)] replays =- [ ("d1d5", "v1.68")- , ("21a8", "v1.66")- , ("0008", "a flip time")+ [ ("0008", "a flip time") , ("000b", "nintendo switch") , ("07e9", "a game mode before Neo Tokyo") , ("0ad2", "some Latin-1 text")@@ -113,6 +111,7 @@ , ("1ef9", "a private hoops match") , ("1f37", "splitscreen players") , ("2114", "a match save")+ , ("21a8", "v1.66") , ("2266", "dropshot") , ("22ba", "a vote to forfeit") , ("27b6", "some UTF-16 text")@@ -153,6 +152,8 @@ , ("946f", "patch 1.43") , ("9704", "a batarang") , ("98e5", "a player using behind view")+ , ("9a2c", "ghost hunt")+ , ("9e35", "spike rush") , ("9eaa", "newer replay without trailing bytes") , ("a09e", "a tournament") , ("a128", "a round count down")@@ -171,10 +172,12 @@ , ("c837", "a spectator") , ("cc4c", "after Starbase ARC") , ("d044", "hoops mutators")+ , ("d1d5", "v1.68") , ("d236", "rlcs s2") , ("d428", "a private hockey match") , ("d52e", "psynet system id") , ("d7fb", "an explosion attribute")+ , ("d818", "heatseeker") , ("db70", "new lag indicator") , ("dcab", "weird ball attribute value") , ("dcb3", "a pawn type attribute")