Copyright | © Jonathan Dowland 2020 |
---|---|
License | GPL-3 |
Maintainer | jon+hackage@dow.land |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell98 |
The Liquorice fundamental data-types.
Synopsis
- data Context = Context {
- location :: Point
- orientation :: Orientation
- linedefs :: [Line]
- sectors :: [Sector]
- things :: [Thing]
- curThingType :: Int
- paletteTop :: String
- paletteMid :: String
- paletteBot :: String
- paletteFloor :: String
- paletteCeil :: String
- paletteLineType :: Int
- paletteLineTag :: Int
- paletteSectorType :: Int
- paletteSectorTag :: Int
- paletteXoff :: Int
- paletteYoff :: Int
- mapName :: String
- type Point = (Int, Int)
- data Orientation
- prev :: (Eq a, Bounded a, Enum a) => a -> a
- next :: (Eq a, Bounded a, Enum a) => a -> a
- data Thing = Thing {
- thingPos :: Point
- thingAngle :: Int
- thingType :: Int
- thingFlags :: Int
- data Sector = Sector {
- floorHeight :: Int
- ceilHeight :: Int
- floorFlat :: String
- ceilFlat :: String
- lightLevel :: Int
- sectorType :: Int
- sectorTag :: Int
- sectorLines :: [Line]
- start :: Context
Documentation
A Context
holds the entirety of all geometry that has been defined at
a point in a program: properties of the Pen: location
and orientation
;
Palette-like properties of the Pen: the current thing Type, textures for
parts of Line
s and Sector
s, etc.;
Lists of geometric objects (linedefs
,sectors
,things
).
Context | |
|
data Orientation Source #
Possible orientations for the Pen: The four cardinal directions.
Instances
Bounded Orientation Source # | |
Defined in Liquorice minBound :: Orientation # maxBound :: Orientation # | |
Enum Orientation Source # | |
Defined in Liquorice succ :: Orientation -> Orientation # pred :: Orientation -> Orientation # toEnum :: Int -> Orientation # fromEnum :: Orientation -> Int # enumFrom :: Orientation -> [Orientation] # enumFromThen :: Orientation -> Orientation -> [Orientation] # enumFromTo :: Orientation -> Orientation -> [Orientation] # enumFromThenTo :: Orientation -> Orientation -> Orientation -> [Orientation] # | |
Eq Orientation Source # | |
Defined in Liquorice (==) :: Orientation -> Orientation -> Bool # (/=) :: Orientation -> Orientation -> Bool # | |
Show Orientation Source # | |
Defined in Liquorice showsPrec :: Int -> Orientation -> ShowS # show :: Orientation -> String # showList :: [Orientation] -> ShowS # |
prev :: (Eq a, Bounded a, Enum a) => a -> a Source #
Utility function, a wrapping alternative to pred
.
next :: (Eq a, Bounded a, Enum a) => a -> a Source #
Utility function, a wrapping alternative to succ
.
An approximation of Doom's Thing data-type, with unboxed fields.
Thing | |
|
An approximation of Doom's Sector data-type, with unboxed fields. Unlike Doom's Sector data structure, we maintain a list of lines that belong to a given Sector.
Sector | |
|