Safe Haskell | None |
---|---|
Language | Haskell2010 |
Rattletrap
- decodeReplayFile :: ByteString -> Either String Replay
- encodeReplayJson :: Replay -> ByteString
- decodeReplayJson :: ByteString -> Either String Replay
- encodeReplayFile :: Replay -> ByteString
- data Replay = Replay {}
- data Section a = Section {
- sectionSize :: Word32le
- sectionCrc :: Word32le
- sectionBody :: a
- data Header = Header {}
- newtype Word32le = Word32le {}
- newtype Str = Str {}
- data Dictionary a
- = DictionaryElement Str a (Dictionary a)
- | DictionaryEnd Str
- data Property = Property {}
- newtype Word64le = Word64le {}
- data PropertyValue a
- newtype List a = List {
- listValue :: [a]
- newtype Word8le = Word8le {}
- newtype Float32le = Float32le {}
- newtype Int32le = Int32le {}
- 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
- data KeyFrame = KeyFrame {}
- data Frame = Frame {}
- data Replication = Replication {}
- data CompressedWord = CompressedWord {}
- data ReplicationValue
- data SpawnedReplication = SpawnedReplication {}
- data Initialization = Initialization {}
- data Vector = Vector {}
- data Int8Vector = Int8Vector {}
- newtype Int8le = Int8le {
- int8leValue :: Int8
- newtype UpdatedReplication = UpdatedReplication {}
- data Attribute = Attribute {}
- data AttributeValue
- = AttributeValueAppliedDamage AppliedDamageAttribute
- | AttributeValueBoolean BooleanAttribute
- | AttributeValueByte ByteAttribute
- | AttributeValueCamSettings CamSettingsAttribute
- | AttributeValueClubColors ClubColorsAttribute
- | AttributeValueDamageState DamageStateAttribute
- | AttributeValueDemolish DemolishAttribute
- | AttributeValueEnum EnumAttribute
- | AttributeValueExplosion ExplosionAttribute
- | AttributeValueExtendedExplosion ExtendedExplosionAttribute
- | AttributeValueFlaggedInt FlaggedIntAttribute
- | AttributeValueFloat FloatAttribute
- | AttributeValueGameMode GameModeAttribute
- | AttributeValueInt IntAttribute
- | AttributeValueLoadout LoadoutAttribute
- | AttributeValueLoadoutOnline LoadoutOnlineAttribute
- | AttributeValueLoadouts LoadoutsAttribute
- | AttributeValueLoadoutsOnline LoadoutsOnlineAttribute
- | AttributeValueLocation LocationAttribute
- | AttributeValueMusicStinger MusicStingerAttribute
- | AttributeValuePartyLeader PartyLeaderAttribute
- | AttributeValuePickup PickupAttribute
- | AttributeValuePlayerHistoryKey PlayerHistoryKeyAttribute
- | AttributeValuePrivateMatchSettings PrivateMatchSettingsAttribute
- | AttributeValueQWord QWordAttribute
- | AttributeValueReservation ReservationAttribute
- | AttributeValueRigidBodyState RigidBodyStateAttribute
- | AttributeValueStatEvent StatEventAttribute
- | AttributeValueString StringAttribute
- | AttributeValueTeamPaint TeamPaintAttribute
- | AttributeValueTitle TitleAttribute
- | AttributeValueUniqueId UniqueIdAttribute
- | AttributeValueWeldedInfo WeldedInfoAttribute
- data AppliedDamageAttribute = AppliedDamageAttribute {}
- newtype BooleanAttribute = BooleanAttribute {}
- newtype ByteAttribute = ByteAttribute {}
- data CamSettingsAttribute = CamSettingsAttribute {}
- data ClubColorsAttribute = ClubColorsAttribute {}
- data DamageStateAttribute = DamageStateAttribute {}
- data DemolishAttribute = DemolishAttribute {}
- newtype EnumAttribute = EnumAttribute {}
- data ExplosionAttribute = ExplosionAttribute {}
- data ExtendedExplosionAttribute = ExtendedExplosionAttribute {}
- data FlaggedIntAttribute = FlaggedIntAttribute {}
- newtype FloatAttribute = FloatAttribute {}
- data GameModeAttribute = GameModeAttribute {}
- newtype IntAttribute = IntAttribute {}
- 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
- newtype LoadoutOnlineAttribute = LoadoutOnlineAttribute {}
- data ProductAttribute = ProductAttribute {}
- data LoadoutsAttribute = LoadoutsAttribute {}
- data LoadoutsOnlineAttribute = LoadoutsOnlineAttribute {}
- newtype LocationAttribute = LocationAttribute {}
- data MusicStingerAttribute = MusicStingerAttribute {}
- data PartyLeaderAttribute = PartyLeaderAttribute {}
- data RemoteId
- data PickupAttribute = PickupAttribute {}
- data PrivateMatchSettingsAttribute = PrivateMatchSettingsAttribute {}
- newtype QWordAttribute = QWordAttribute {}
- data ReservationAttribute = ReservationAttribute {}
- data UniqueIdAttribute = UniqueIdAttribute {}
- data RigidBodyStateAttribute = RigidBodyStateAttribute {}
- data CompressedWordVector = CompressedWordVector {}
- newtype StringAttribute = StringAttribute {}
- data TeamPaintAttribute = TeamPaintAttribute {}
- data WeldedInfoAttribute = WeldedInfoAttribute {}
- data DestroyedReplication = DestroyedReplication
- data Message = Message {}
- data Mark = Mark {}
- data ClassMapping = ClassMapping {}
- data Cache = Cache {}
- data AttributeMapping = AttributeMapping {}
Documentation
decodeReplayFile :: ByteString -> Either String Replay #
Parses a raw replay.
encodeReplayJson :: Replay -> ByteString #
Encodes a replay as JSON.
decodeReplayJson :: ByteString -> Either String Replay #
Parses a JSON replay.
encodeReplayFile :: Replay -> ByteString #
Encodes a raw replay.
A Rocket League replay.
Constructors
Replay | |
Fields
|
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
|
Contains high-level metadata about a Replay
.
Constructors
Header | |
Fields
|
Constructors
Word32le | |
Fields |
data Dictionary a #
Constructors
DictionaryElement Str a (Dictionary a) | |
DictionaryEnd Str |
Instances
Eq a => Eq (Dictionary a) # | |
Ord a => Ord (Dictionary a) # | |
Show a => Show (Dictionary a) # | |
ToJSON a => ToJSON (Dictionary a) # | |
FromJSON a => FromJSON (Dictionary a) # | |
Constructors
Property | |
Fields
|
Constructors
Word64le | |
Fields |
data PropertyValue a #
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
Eq a => Eq (PropertyValue a) # | |
Ord a => Ord (PropertyValue a) # | |
Show a => Show (PropertyValue a) # | |
ToJSON a => ToJSON (PropertyValue a) # | |
FromJSON a => FromJSON (PropertyValue a) # | |
Constructors
Word8le | |
Fields |
Constructors
Float32le | |
Fields |
Constructors
Int32le | |
Fields |
Contains low-level game data about a Replay
.
Constructors
Content | |
Fields
|
Constructors
KeyFrame | |
Fields
|
Constructors
Frame | |
Fields
|
data CompressedWord #
Constructors
CompressedWord | |
Fields |
data ReplicationValue #
Constructors
ReplicationValueSpawned SpawnedReplication | Creates a new actor. |
ReplicationValueUpdated UpdatedReplication | Updates an existing actor. |
ReplicationValueDestroyed DestroyedReplication | Destroys an existing actor. |
data SpawnedReplication #
Constructors
SpawnedReplication | |
Fields
|
data Initialization #
Constructors
Initialization | |
Fields
|
data Int8Vector #
Constructors
Int8Vector | |
Fields
|
Instances
Constructors
Int8le | |
Fields
|
newtype UpdatedReplication #
Constructors
UpdatedReplication | |
Fields |
Constructors
Attribute | |
Fields
|
data AttributeValue #
Constructors
data AppliedDamageAttribute #
Constructors
AppliedDamageAttribute | |
newtype BooleanAttribute #
Constructors
BooleanAttribute | |
Fields |
data CamSettingsAttribute #
Constructors
data ClubColorsAttribute #
Constructors
ClubColorsAttribute | |
data DamageStateAttribute #
Constructors
DamageStateAttribute | |
data DemolishAttribute #
Constructors
DemolishAttribute | |
data ExplosionAttribute #
Constructors
ExplosionAttribute | |
data ExtendedExplosionAttribute #
Constructors
ExtendedExplosionAttribute | |
data FlaggedIntAttribute #
Constructors
FlaggedIntAttribute | |
Fields |
newtype FloatAttribute #
Constructors
FloatAttribute | |
Fields |
data GameModeAttribute #
Constructors
GameModeAttribute | |
Fields |
data LoadoutAttribute #
Constructors
newtype LoadoutOnlineAttribute #
Constructors
LoadoutOnlineAttribute | |
Fields |
data ProductAttribute #
Constructors
ProductAttribute | |
Fields |
data LoadoutsAttribute #
Constructors
LoadoutsAttribute | |
data LoadoutsOnlineAttribute #
Constructors
LoadoutsOnlineAttribute | |
newtype LocationAttribute #
Constructors
LocationAttribute | |
Fields |
data MusicStingerAttribute #
Constructors
MusicStingerAttribute | |
data PartyLeaderAttribute #
Constructors
PartyLeaderAttribute | |
Fields |
data PickupAttribute #
Constructors
PickupAttribute | |
data PrivateMatchSettingsAttribute #
Constructors
PrivateMatchSettingsAttribute | |
newtype QWordAttribute #
Constructors
QWordAttribute | |
Fields |
data ReservationAttribute #
Constructors
ReservationAttribute | |
data UniqueIdAttribute #
Constructors
UniqueIdAttribute | |
data RigidBodyStateAttribute #
Constructors
RigidBodyStateAttribute | |
data CompressedWordVector #
Constructors
CompressedWordVector | |
newtype StringAttribute #
Constructors
StringAttribute | |
Fields |
data TeamPaintAttribute #
Constructors
TeamPaintAttribute | |
data WeldedInfoAttribute #
Constructors
WeldedInfoAttribute | |
data DestroyedReplication #
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 |
Constructors
Message | |
Fields
|
Constructors
Mark | |
Constructors
Cache | |
data AttributeMapping #
Constructors
AttributeMapping | |