| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Rattletrap
Synopsis
- main :: IO ()
- rattletrap :: String -> [String] -> IO ()
- decodeReplayFile :: Bool -> ByteString -> Either String Replay
- encodeReplayJson :: Replay -> ByteString
- decodeReplayJson :: ByteString -> Either String Replay
- encodeReplayFile :: Bool -> Replay -> ByteString
- data AppliedDamageAttribute = AppliedDamageAttribute {}
- data Attribute = Attribute {}
- data AttributeMapping = AttributeMapping {}
- data AttributeType
- = AttributeTypeAppliedDamage
- | AttributeTypeBoolean
- | AttributeTypeByte
- | AttributeTypeCamSettings
- | AttributeTypeClubColors
- | AttributeTypeDamageState
- | AttributeTypeDemolish
- | AttributeTypeEnum
- | AttributeTypeExplosion
- | AttributeTypeExtendedExplosion
- | AttributeTypeFlaggedInt
- | AttributeTypeFlaggedByte
- | AttributeTypeFloat
- | AttributeTypeGameMode
- | AttributeTypeInt
- | AttributeTypeInt64
- | AttributeTypeLoadout
- | AttributeTypeLoadoutOnline
- | AttributeTypeLoadouts
- | AttributeTypeLoadoutsOnline
- | AttributeTypeLocation
- | AttributeTypeMusicStinger
- | AttributeTypePartyLeader
- | AttributeTypePickup
- | AttributeTypePickupNew
- | AttributeTypePlayerHistoryKey
- | AttributeTypePrivateMatchSettings
- | AttributeTypeQWord
- | AttributeTypeReservation
- | AttributeTypeRigidBodyState
- | AttributeTypeStatEvent
- | AttributeTypeString
- | AttributeTypeTeamPaint
- | AttributeTypeTitle
- | AttributeTypeUniqueId
- | AttributeTypeWeldedInfo
- data AttributeValue
- = AttributeValueAppliedDamage AppliedDamageAttribute
- | AttributeValueBoolean BooleanAttribute
- | AttributeValueByte ByteAttribute
- | AttributeValueCamSettings CamSettingsAttribute
- | AttributeValueClubColors ClubColorsAttribute
- | AttributeValueDamageState DamageStateAttribute
- | AttributeValueDemolish DemolishAttribute
- | AttributeValueEnum EnumAttribute
- | AttributeValueExplosion ExplosionAttribute
- | AttributeValueExtendedExplosion ExtendedExplosionAttribute
- | AttributeValueFlaggedInt FlaggedIntAttribute
- | AttributeValueFlaggedByte FlaggedByteAttribute
- | AttributeValueFloat FloatAttribute
- | AttributeValueGameMode GameModeAttribute
- | AttributeValueInt IntAttribute
- | AttributeValueInt64 Int64Attribute
- | AttributeValueLoadout LoadoutAttribute
- | AttributeValueLoadoutOnline LoadoutOnlineAttribute
- | AttributeValueLoadouts LoadoutsAttribute
- | AttributeValueLoadoutsOnline LoadoutsOnlineAttribute
- | AttributeValueLocation LocationAttribute
- | AttributeValueMusicStinger MusicStingerAttribute
- | AttributeValuePartyLeader PartyLeaderAttribute
- | AttributeValuePickup PickupAttribute
- | AttributeValuePickupNew PickupAttributeNew
- | AttributeValuePlayerHistoryKey PlayerHistoryKeyAttribute
- | AttributeValuePrivateMatchSettings PrivateMatchSettingsAttribute
- | AttributeValueQWord QWordAttribute
- | AttributeValueReservation ReservationAttribute
- | AttributeValueRigidBodyState RigidBodyStateAttribute
- | AttributeValueStatEvent StatEventAttribute
- | AttributeValueString StringAttribute
- | AttributeValueTeamPaint TeamPaintAttribute
- | AttributeValueTitle TitleAttribute
- | AttributeValueUniqueId UniqueIdAttribute
- | AttributeValueWeldedInfo WeldedInfoAttribute
- newtype BooleanAttribute = BooleanAttribute {}
- newtype ByteAttribute = ByteAttribute {}
- data Cache = Cache {}
- data CamSettingsAttribute = CamSettingsAttribute {}
- data ClassAttributeMap = ClassAttributeMap {}
- data ClassMapping = ClassMapping {}
- data ClubColorsAttribute = ClubColorsAttribute {}
- data CompressedWord = CompressedWord {}
- data CompressedWordVector = CompressedWordVector {}
- data Content = Content {
- contentLevels :: List Str
- contentKeyFrames :: List KeyFrame
- contentStreamSize :: Word32le
- contentFrames :: [Frame]
- contentMessages :: List Message
- contentMarks :: List Mark
- contentPackages :: List Str
- contentObjects :: List Str
- contentNames :: List Str
- contentClassMappings :: List ClassMapping
- contentCaches :: List Cache
- contentUnknown :: [Word8]
- data DamageStateAttribute = DamageStateAttribute {}
- data DemolishAttribute = DemolishAttribute {}
- data DestroyedReplication = DestroyedReplication
- data Dictionary a
- = DictionaryElement Str a (Dictionary a)
- | DictionaryEnd Str
- newtype EnumAttribute = EnumAttribute {}
- data ExplosionAttribute = ExplosionAttribute {}
- data ExtendedExplosionAttribute = ExtendedExplosionAttribute {}
- data FlaggedIntAttribute = FlaggedIntAttribute {}
- newtype Float32le = Float32le {}
- newtype FloatAttribute = FloatAttribute {}
- data Frame = Frame {}
- data GameModeAttribute = GameModeAttribute {}
- data Header = Header {}
- data Initialization = Initialization {}
- newtype Int32le = Int32le {}
- newtype Int64Attribute = Int64Attribute {}
- newtype Int64le = Int64le {}
- newtype Int8le = Int8le {
- int8leValue :: Int8
- data Int8Vector = Int8Vector {}
- newtype IntAttribute = IntAttribute {}
- data KeyFrame = KeyFrame {}
- newtype List a = List {
- listValue :: [a]
- data LoadoutAttribute = LoadoutAttribute {
- loadoutAttributeVersion :: Word8le
- loadoutAttributeBody :: Word32le
- loadoutAttributeDecal :: Word32le
- loadoutAttributeWheels :: Word32le
- loadoutAttributeRocketTrail :: Word32le
- loadoutAttributeAntenna :: Word32le
- loadoutAttributeTopper :: Word32le
- loadoutAttributeUnknown1 :: Word32le
- loadoutAttributeUnknown2 :: Maybe Word32le
- loadoutAttributeEngineAudio :: Maybe Word32le
- loadoutAttributeTrail :: Maybe Word32le
- loadoutAttributeGoalExplosion :: Maybe Word32le
- loadoutAttributeBanner :: Maybe Word32le
- loadoutAttributeUnknown3 :: Maybe Word32le
- loadoutAttributeUnknown4 :: Maybe Word32le
- loadoutAttributeUnknown5 :: Maybe Word32le
- loadoutAttributeUnknown6 :: Maybe Word32le
- newtype LoadoutOnlineAttribute = LoadoutOnlineAttribute {}
- data LoadoutsAttribute = LoadoutsAttribute {}
- data LoadoutsOnlineAttribute = LoadoutsOnlineAttribute {}
- newtype LocationAttribute = LocationAttribute {}
- data Mark = Mark {}
- data Message = Message {}
- data MusicStingerAttribute = MusicStingerAttribute {}
- data PartyLeaderAttribute = PartyLeaderAttribute {}
- data PickupAttribute = PickupAttribute {}
- newtype PlayerHistoryKeyAttribute = PlayerHistoryKeyAttribute {}
- data PrivateMatchSettingsAttribute = PrivateMatchSettingsAttribute {}
- data ProductAttribute = ProductAttribute {
- productAttributeUnknown :: Bool
- productAttributeObjectId :: Word32le
- productAttributeObjectName :: Maybe Str
- productAttributeValue :: ProductAttributeValue
- data Property = Property {}
- data PropertyValue a
- data Quaternion = Quaternion {}
- newtype QWordAttribute = QWordAttribute {}
- data RemoteId
- data Replay = Replay {}
- data Replication = Replication {}
- data ReplicationValue
- data ReservationAttribute = ReservationAttribute {}
- data RigidBodyStateAttribute = RigidBodyStateAttribute {}
- data Rotation
- data Section a = Section {
- sectionSize :: Word32le
- sectionCrc :: Word32le
- sectionBody :: a
- data SpawnedReplication = SpawnedReplication {}
- data StatEventAttribute = StatEventAttribute {}
- newtype Str = Str {}
- newtype StringAttribute = StringAttribute {}
- data TeamPaintAttribute = TeamPaintAttribute {}
- data TitleAttribute = TitleAttribute {}
- data UniqueIdAttribute = UniqueIdAttribute {}
- newtype UpdatedReplication = UpdatedReplication {}
- data Vector = Vector {
- vectorSize :: CompressedWord
- vectorBias :: Word
- vectorX :: Int
- vectorY :: Int
- vectorZ :: Int
- data WeldedInfoAttribute = WeldedInfoAttribute {}
- newtype Word32le = Word32le {}
- newtype Word64le = Word64le {}
- newtype Word8le = Word8le {}
Documentation
decodeReplayFile :: Bool -> ByteString -> Either String Replay Source #
Parses a raw replay.
encodeReplayJson :: Replay -> ByteString Source #
Encodes a replay as JSON.
decodeReplayJson :: ByteString -> Either String Replay Source #
Parses a JSON replay.
encodeReplayFile :: Bool -> Replay -> ByteString Source #
Encodes a raw replay.
data AppliedDamageAttribute Source #
Constructors
| AppliedDamageAttribute | |
Instances
Constructors
| Attribute | |
Fields
| |
Instances
| Eq Attribute Source # | |
| Ord Attribute Source # | |
| Show Attribute Source # | |
| ToJSON Attribute Source # | |
Defined in Rattletrap.Type.Attribute | |
| FromJSON Attribute Source # | |
data AttributeMapping Source #
Constructors
| AttributeMapping | |
Instances
data AttributeType Source #
Constructors
Instances
data AttributeValue Source #
Constructors
Instances
newtype BooleanAttribute Source #
Constructors
| BooleanAttribute | |
Fields | |
Instances
newtype ByteAttribute Source #
Constructors
| ByteAttribute | |
Fields | |
Instances
Constructors
| Cache | |
data CamSettingsAttribute Source #
Constructors
Instances
data ClassAttributeMap Source #
This data structure holds all the information about classes, objects, and
attributes in the replay. The class hierarchy is not fixed; it is encoded
in the Content. Similarly, the attributes that belong
to each class are not fixed either. Converting the raw data into a usable
structure is tedious; see makeClassAttributeMap.
Constructors
| ClassAttributeMap | |
Fields
| |
Instances
| Eq ClassAttributeMap Source # | |
Defined in Rattletrap.Type.ClassAttributeMap Methods (==) :: ClassAttributeMap -> ClassAttributeMap -> Bool # (/=) :: ClassAttributeMap -> ClassAttributeMap -> Bool # | |
| Ord ClassAttributeMap Source # | |
Defined in Rattletrap.Type.ClassAttributeMap Methods compare :: ClassAttributeMap -> ClassAttributeMap -> Ordering # (<) :: ClassAttributeMap -> ClassAttributeMap -> Bool # (<=) :: ClassAttributeMap -> ClassAttributeMap -> Bool # (>) :: ClassAttributeMap -> ClassAttributeMap -> Bool # (>=) :: ClassAttributeMap -> ClassAttributeMap -> Bool # max :: ClassAttributeMap -> ClassAttributeMap -> ClassAttributeMap # min :: ClassAttributeMap -> ClassAttributeMap -> ClassAttributeMap # | |
| Show ClassAttributeMap Source # | |
Defined in Rattletrap.Type.ClassAttributeMap Methods showsPrec :: Int -> ClassAttributeMap -> ShowS # show :: ClassAttributeMap -> String # showList :: [ClassAttributeMap] -> ShowS # | |
data ClassMapping Source #
Constructors
| ClassMapping | |
Fields | |
Instances
| Eq ClassMapping Source # | |
Defined in Rattletrap.Type.ClassMapping | |
| Ord ClassMapping Source # | |
Defined in Rattletrap.Type.ClassMapping Methods compare :: ClassMapping -> ClassMapping -> Ordering # (<) :: ClassMapping -> ClassMapping -> Bool # (<=) :: ClassMapping -> ClassMapping -> Bool # (>) :: ClassMapping -> ClassMapping -> Bool # (>=) :: ClassMapping -> ClassMapping -> Bool # max :: ClassMapping -> ClassMapping -> ClassMapping # min :: ClassMapping -> ClassMapping -> ClassMapping # | |
| Show ClassMapping Source # | |
Defined in Rattletrap.Type.ClassMapping Methods showsPrec :: Int -> ClassMapping -> ShowS # show :: ClassMapping -> String # showList :: [ClassMapping] -> ShowS # | |
| ToJSON ClassMapping Source # | |
Defined in Rattletrap.Type.ClassMapping Methods toJSON :: ClassMapping -> Value # toEncoding :: ClassMapping -> Encoding # toJSONList :: [ClassMapping] -> Value # toEncodingList :: [ClassMapping] -> Encoding # | |
| FromJSON ClassMapping Source # | |
Defined in Rattletrap.Type.ClassMapping | |
data ClubColorsAttribute Source #
Constructors
| ClubColorsAttribute | |
Instances
data CompressedWord Source #
Although there's no guarantee that these values will not overflow, it's
exceptionally unlikely. Most CompressedWords are very small.
Constructors
| CompressedWord | |
Fields | |
Instances
data CompressedWordVector Source #
Constructors
| CompressedWordVector | |
Instances
Contains low-level game data about a Replay.
Constructors
| Content | |
Fields
| |
data DamageStateAttribute Source #
Constructors
| DamageStateAttribute | |
Instances
data DemolishAttribute Source #
Constructors
| DemolishAttribute | |
Instances
data DestroyedReplication Source #
Destroyed replications don't actually contain any extra information. All
you need to know is the actor's ID, which is given by the
Replication.
Constructors
| DestroyedReplication |
Instances
data Dictionary a Source #
Constructors
| DictionaryElement Str a (Dictionary a) | |
| DictionaryEnd Str |
Instances
newtype EnumAttribute Source #
Constructors
| EnumAttribute | |
Fields | |
Instances
data ExplosionAttribute Source #
Constructors
| ExplosionAttribute | |
Instances
data ExtendedExplosionAttribute Source #
Constructors
| ExtendedExplosionAttribute | |
Instances
data FlaggedIntAttribute Source #
Constructors
| FlaggedIntAttribute | |
Fields | |
Instances
Constructors
| Float32le | |
Fields | |
Instances
| Eq Float32le Source # | |
| Ord Float32le Source # | |
| Show Float32le Source # | |
| ToJSON Float32le Source # | |
Defined in Rattletrap.Type.Float32le | |
| FromJSON Float32le Source # | |
newtype FloatAttribute Source #
Constructors
| FloatAttribute | |
Fields | |
Instances
Constructors
| Frame | |
Fields
| |
data GameModeAttribute Source #
Constructors
| GameModeAttribute | |
Fields | |
Instances
Contains high-level metadata about a Replay.
Constructors
| Header | |
Fields
| |
data Initialization Source #
Constructors
| Initialization | |
Fields
| |
Instances
Constructors
| Int32le | |
Fields | |
newtype Int64Attribute Source #
Constructors
| Int64Attribute | |
Fields | |
Instances
Constructors
| Int64le | |
Fields | |
Constructors
| Int8le | |
Fields
| |
data Int8Vector Source #
Constructors
| Int8Vector | |
Fields
| |
Instances
| Eq Int8Vector Source # | |
Defined in Rattletrap.Type.Int8Vector | |
| Ord Int8Vector Source # | |
Defined in Rattletrap.Type.Int8Vector Methods compare :: Int8Vector -> Int8Vector -> Ordering # (<) :: Int8Vector -> Int8Vector -> Bool # (<=) :: Int8Vector -> Int8Vector -> Bool # (>) :: Int8Vector -> Int8Vector -> Bool # (>=) :: Int8Vector -> Int8Vector -> Bool # max :: Int8Vector -> Int8Vector -> Int8Vector # min :: Int8Vector -> Int8Vector -> Int8Vector # | |
| Show Int8Vector Source # | |
Defined in Rattletrap.Type.Int8Vector Methods showsPrec :: Int -> Int8Vector -> ShowS # show :: Int8Vector -> String # showList :: [Int8Vector] -> ShowS # | |
| ToJSON Int8Vector Source # | |
Defined in Rattletrap.Type.Int8Vector Methods toJSON :: Int8Vector -> Value # toEncoding :: Int8Vector -> Encoding # toJSONList :: [Int8Vector] -> Value # toEncodingList :: [Int8Vector] -> Encoding # | |
| FromJSON Int8Vector Source # | |
Defined in Rattletrap.Type.Int8Vector | |
newtype IntAttribute Source #
Constructors
| IntAttribute | |
Fields | |
Instances
| Eq IntAttribute Source # | |
Defined in Rattletrap.Type.IntAttribute | |
| Ord IntAttribute Source # | |
Defined in Rattletrap.Type.IntAttribute Methods compare :: IntAttribute -> IntAttribute -> Ordering # (<) :: IntAttribute -> IntAttribute -> Bool # (<=) :: IntAttribute -> IntAttribute -> Bool # (>) :: IntAttribute -> IntAttribute -> Bool # (>=) :: IntAttribute -> IntAttribute -> Bool # max :: IntAttribute -> IntAttribute -> IntAttribute # min :: IntAttribute -> IntAttribute -> IntAttribute # | |
| Show IntAttribute Source # | |
Defined in Rattletrap.Type.IntAttribute Methods showsPrec :: Int -> IntAttribute -> ShowS # show :: IntAttribute -> String # showList :: [IntAttribute] -> ShowS # | |
| ToJSON IntAttribute Source # | |
Defined in Rattletrap.Type.IntAttribute Methods toJSON :: IntAttribute -> Value # toEncoding :: IntAttribute -> Encoding # toJSONList :: [IntAttribute] -> Value # toEncodingList :: [IntAttribute] -> Encoding # | |
| FromJSON IntAttribute Source # | |
Defined in Rattletrap.Type.IntAttribute | |
Constructors
| KeyFrame | |
Fields
| |
data LoadoutAttribute Source #
Constructors
Instances
newtype LoadoutOnlineAttribute Source #
Constructors
| LoadoutOnlineAttribute | |
Fields | |
Instances
data LoadoutsAttribute Source #
Constructors
| LoadoutsAttribute | |
Instances
data LoadoutsOnlineAttribute Source #
Constructors
| LoadoutsOnlineAttribute | |
Instances
newtype LocationAttribute Source #
Constructors
| LocationAttribute | |
Fields | |
Instances
Constructors
| Mark | |
Constructors
| Message | |
Fields
| |
data MusicStingerAttribute Source #
Constructors
| MusicStingerAttribute | |
Instances
data PartyLeaderAttribute Source #
Constructors
| PartyLeaderAttribute | |
Fields | |
Instances
data PickupAttribute Source #
Constructors
| PickupAttribute | |
Instances
newtype PlayerHistoryKeyAttribute Source #
Constructors
| PlayerHistoryKeyAttribute | |
Fields | |
Instances
data PrivateMatchSettingsAttribute Source #
Constructors
| PrivateMatchSettingsAttribute | |
Instances
data ProductAttribute Source #
Constructors
| ProductAttribute | |
Fields
| |
Instances
Constructors
| Property | |
Fields
| |
data PropertyValue a Source #
Constructors
| PropertyValueArray (List (Dictionary a)) | Yes, a list of dictionaries. No, it doesn't make sense. These usually only have one element. |
| PropertyValueBool Word8le | |
| PropertyValueByte Str (Maybe Str) | This is a strange name for essentially a key-value pair. |
| PropertyValueFloat Float32le | |
| PropertyValueInt Int32le | |
| PropertyValueName Str | It's unclear how exactly this is different than a |
| PropertyValueQWord Word64le | |
| PropertyValueStr Str |
Instances
data Quaternion Source #
Constructors
| Quaternion | |
Fields
| |
Instances
| Eq Quaternion Source # | |
Defined in Rattletrap.Type.Quaternion | |
| Ord Quaternion Source # | |
Defined in Rattletrap.Type.Quaternion Methods compare :: Quaternion -> Quaternion -> Ordering # (<) :: Quaternion -> Quaternion -> Bool # (<=) :: Quaternion -> Quaternion -> Bool # (>) :: Quaternion -> Quaternion -> Bool # (>=) :: Quaternion -> Quaternion -> Bool # max :: Quaternion -> Quaternion -> Quaternion # min :: Quaternion -> Quaternion -> Quaternion # | |
| Show Quaternion Source # | |
Defined in Rattletrap.Type.Quaternion Methods showsPrec :: Int -> Quaternion -> ShowS # show :: Quaternion -> String # showList :: [Quaternion] -> ShowS # | |
| ToJSON Quaternion Source # | |
Defined in Rattletrap.Type.Quaternion Methods toJSON :: Quaternion -> Value # toEncoding :: Quaternion -> Encoding # toJSONList :: [Quaternion] -> Value # toEncodingList :: [Quaternion] -> Encoding # | |
| FromJSON Quaternion Source # | |
Defined in Rattletrap.Type.Quaternion | |
newtype QWordAttribute Source #
Constructors
| QWordAttribute | |
Fields | |
Instances
Constructors
A Rocket League replay.
Constructors
| Replay | |
Fields
| |
data Replication Source #
Constructors
| Replication | |
Instances
| Eq Replication Source # | |
Defined in Rattletrap.Type.Replication | |
| Ord Replication Source # | |
Defined in Rattletrap.Type.Replication Methods compare :: Replication -> Replication -> Ordering # (<) :: Replication -> Replication -> Bool # (<=) :: Replication -> Replication -> Bool # (>) :: Replication -> Replication -> Bool # (>=) :: Replication -> Replication -> Bool # max :: Replication -> Replication -> Replication # min :: Replication -> Replication -> Replication # | |
| Show Replication Source # | |
Defined in Rattletrap.Type.Replication Methods showsPrec :: Int -> Replication -> ShowS # show :: Replication -> String # showList :: [Replication] -> ShowS # | |
| ToJSON Replication Source # | |
Defined in Rattletrap.Type.Replication Methods toJSON :: Replication -> Value # toEncoding :: Replication -> Encoding # toJSONList :: [Replication] -> Value # toEncodingList :: [Replication] -> Encoding # | |
| FromJSON Replication Source # | |
Defined in Rattletrap.Type.Replication | |
data ReplicationValue Source #
Constructors
| ReplicationValueSpawned SpawnedReplication | Creates a new actor. |
| ReplicationValueUpdated UpdatedReplication | Updates an existing actor. |
| ReplicationValueDestroyed DestroyedReplication | Destroys an existing actor. |
Instances
data ReservationAttribute Source #
Constructors
| ReservationAttribute | |
Instances
data RigidBodyStateAttribute Source #
Constructors
| RigidBodyStateAttribute | |
Instances
A section is a large piece of a Replay. It has a
32-bit size (in bytes), a 32-bit CRC (see Rattletrap.Utility.Crc), and then a
bunch of data (the body). This interface is provided so that you don't have
to think about the size and CRC.
Constructors
| Section | |
Fields
| |
Instances
| Eq a => Eq (Section a) Source # | |
| Ord a => Ord (Section a) Source # | |
| Show a => Show (Section a) Source # | |
| ToJSON a => ToJSON (Section a) Source # | |
Defined in Rattletrap.Type.Section | |
| FromJSON a => FromJSON (Section a) Source # | |
data SpawnedReplication Source #
Constructors
| SpawnedReplication | |
Fields
| |
Instances
data StatEventAttribute Source #
Constructors
| StatEventAttribute | |
Instances
newtype StringAttribute Source #
Constructors
| StringAttribute | |
Fields | |
Instances
data TeamPaintAttribute Source #
Constructors
| TeamPaintAttribute | |
Instances
data TitleAttribute Source #
Constructors
| TitleAttribute | |
Instances
data UniqueIdAttribute Source #
Constructors
| UniqueIdAttribute | |
Instances
newtype UpdatedReplication Source #
Constructors
| UpdatedReplication | |
Fields | |
Instances
Constructors
| Vector | |
Fields
| |
data WeldedInfoAttribute Source #
Constructors
| WeldedInfoAttribute | |
Instances
Constructors
| Word32le | |
Fields | |
Constructors
| Word64le | |
Fields | |