Safe Haskell | None |
---|---|
Language | Haskell2010 |
Field Of View scanning with a variety of algorithms. See https://github.com/LambdaHack/LambdaHack/wiki/Fov-and-los for discussion.
- dungeonPerception :: FovMode -> State -> StateServer -> Pers
- fidLidPerception :: FovMode -> PersLit -> FactionId -> LevelId -> Level -> Perception
- type PersLit = EnumMap LevelId (EnumMap FactionId [(Actor, FovCache3)], Array Bool, Array Bool)
- litInDungeon :: FovMode -> State -> StateServer -> PersLit
- newtype PerceptionReachable = PerceptionReachable {
- preachable :: [Point]
- newtype PerceptionDynamicLit = PerceptionDynamicLit {
- pdynamicLit :: [Point]
Documentation
dungeonPerception :: FovMode -> State -> StateServer -> Pers Source
Calculate the perception of the whole dungeon.
fidLidPerception :: FovMode -> PersLit -> FactionId -> LevelId -> Level -> Perception Source
Calculate faction's perception of a level based on the lit tiles cache.
type PersLit = EnumMap LevelId (EnumMap FactionId [(Actor, FovCache3)], Array Bool, Array Bool) Source
The cache of FOV information for a level, such as sight, smell and light radiuses for each actor and bitmaps of clear and lit positions.
litInDungeon :: FovMode -> State -> StateServer -> PersLit Source
Compute all lit positions in the dungeon.
Internal operations
newtype PerceptionReachable Source
Visually reachable positions (light passes through them to the actor). The list may contain (many) repetitions.
newtype PerceptionDynamicLit Source
All positions lit by dynamic lights on a level. Shared by all factions. The list may contain (many) repetitions.