octane-0.11.0: Parse Rocket League replays.

Safe HaskellNone
LanguageHaskell2010

Octane.Utility.ClassPropertyMap

Description

This module is responsible for building the class property map, which maps class IDs to a map of property IDs to property names. This map is the cornerstone of the replay stream parser.

Synopsis

Documentation

getClassPropertyMap :: ReplayWithoutFrames -> IntMap (IntMap Text) Source #

The class property map is a map from class IDs in the stream to a map from property IDs in the stream to property names.

getClassCache :: ReplayWithoutFrames -> [(Int, Int, Int)] Source #

The class cache is a list of 3-tuples where the first element is a class ID, the second is its cache ID, and the third is its parent's cache ID.

getClassIds :: ReplayWithoutFrames -> [Int] Source #

The class IDs in a replay. Comes from the class cache.

getParentClassId :: Int -> [(Int, Int, Int)] -> Maybe Int Source #

Gets the parent class ID for the given parent cache ID. This is necessary because there is not always a class with the given cache ID in the cache. When that happens, the parent cache ID is decremented and tried again.

getBasicClassMap :: ReplayWithoutFrames -> IntMap Int Source #

The basic class map is a naive mapping from class ID to its parent class ID. It's naive because it only maps the class ID to its immediate parent. It does not chase the inheritance all the way down.

getParentClassIds :: Int -> IntMap Int -> [Int] Source #

Given a naive mapping from class ID to its parent class ID, return all of the parent IDs for a given class.

getClassMap :: ReplayWithoutFrames -> IntMap [Int] Source #

The class map is a mapping from a class ID to all of its parent class IDs.

getPropertyMap :: ReplayWithoutFrames -> IntMap Text Source #

The property map is a mapping from property IDs to property names.

getBasicClassPropertyMap :: ReplayWithoutFrames -> IntMap (IntMap Text) Source #

The basic class property map is a naive mapping from class IDs to a mapping from property IDs to property names. It's naive because it does not include the properties from the class's parents.

getActorMap :: ReplayWithoutFrames -> Map Text Int Source #

The actor map is a mapping from class names to their IDs.

getClass Source #

Arguments

:: IntMap Text

Property ID to property name

-> Map Text Text

Property name to class name

-> Map Text Int

Class name to class ID

-> Int

property ID

-> Maybe (Int, Text)

Maybe class ID and class name

Gets the class ID and name for a given property ID.