Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ClassAttributeMap = ClassAttributeMap {}
- type Bimap l r = (Map l r, Map r l)
- bimap :: (Ord l, Ord r) => [(l, r)] -> Bimap l r
- lookupL :: Ord l => l -> Bimap l r -> Maybe r
- lookupR :: Ord r => r -> Bimap l r -> Maybe l
- make :: List Str -> List ClassMapping -> List Cache -> List Str -> ClassAttributeMap
- makeNameMap :: List Str -> IntMap Str
- getName :: IntMap Str -> U32 -> Maybe Str
- makeObjectClassMap :: Map U32 Str -> Bimap U32 Str -> Map U32 U32
- getClassId :: Map U32 Str -> Bimap U32 Str -> U32 -> Maybe U32
- makeClassCache :: Bimap U32 Str -> List Cache -> [(Maybe Str, U32, U32, U32)]
- makeClassMap :: List ClassMapping -> Bimap U32 Str
- makeAttributeMap :: List Cache -> Map U32 (Map U32 U32)
- makeShallowParentMap :: [(Maybe Str, U32, U32, U32)] -> Map U32 U32
- makeParentMap :: [(Maybe Str, U32, U32, U32)] -> Map U32 [U32]
- getParentClasses :: Map U32 U32 -> U32 -> [U32]
- getParentClass :: Maybe Str -> U32 -> [(Maybe Str, U32, U32, U32)] -> Maybe U32
- getParentClassById :: U32 -> [(Maybe Str, U32, U32, U32)] -> Maybe U32
- getParentClassByName :: Str -> U32 -> [(Maybe Str, U32, U32, U32)] -> Maybe U32
- makeObjectMap :: List Str -> Map U32 Str
- getObjectName :: Map U32 Str -> U32 -> Maybe Str
- getClassName :: Str -> Maybe Str
- normalizeObjectName :: Str -> Str
- classHasLocation :: Str -> Bool
- classHasRotation :: Str -> Bool
- getAttributeIdLimit :: Map U32 U32 -> Maybe Word
- getAttributeName :: ClassAttributeMap -> Map U32 U32 -> CompressedWord -> Maybe Str
- getAttributeMap :: ClassAttributeMap -> Map CompressedWord U32 -> CompressedWord -> Maybe (Map U32 U32)
Documentation
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 make
.
Instances
Show ClassAttributeMap Source # | |
Defined in Rattletrap.Type.ClassAttributeMap showsPrec :: Int -> ClassAttributeMap -> ShowS # show :: ClassAttributeMap -> String # showList :: [ClassAttributeMap] -> ShowS # | |
Eq ClassAttributeMap Source # | |
Defined in Rattletrap.Type.ClassAttributeMap (==) :: ClassAttributeMap -> ClassAttributeMap -> Bool # (/=) :: ClassAttributeMap -> ClassAttributeMap -> Bool # |
:: List Str | From |
-> List ClassMapping | From |
-> List Cache | From |
-> List Str | From |
-> ClassAttributeMap |
Makes a ClassAttributeMap
given the necessary fields from the
Content
.
makeClassMap :: List ClassMapping -> Bimap U32 Str Source #
normalizeObjectName :: Str -> Str Source #
classHasLocation :: Str -> Bool Source #
classHasRotation :: Str -> Bool Source #
getAttributeName :: ClassAttributeMap -> Map U32 U32 -> CompressedWord -> Maybe Str Source #
getAttributeMap :: ClassAttributeMap -> Map CompressedWord U32 -> CompressedWord -> Maybe (Map U32 U32) Source #