Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Rendering of cells in the map view
SPDX-License-Identifier: BSD-3-Clause
Synopsis
- renderDisplay :: Display -> Widget n
- drawLoc :: UIState -> GameState -> Cosmic Coords -> Widget Name
- data RenderingInput = RenderingInput {}
- displayTerrainCell :: WorldOverdraw -> RenderingInput -> Cosmic Coords -> Display
- displayRobotCell :: GameState -> Cosmic Coords -> [Display]
- mkEntityKnowledge :: GameState -> EntityKnowledgeDependencies
- data EntityKnowledgeDependencies = EntityKnowledgeDependencies {}
- getEntityIsKnown :: EntityKnowledgeDependencies -> EntityPaint -> Bool
- displayEntityCell :: WorldOverdraw -> RenderingInput -> Cosmic Coords -> [Display]
- displayLoc :: Bool -> WorldOverdraw -> GameState -> Cosmic Coords -> Display
- displayLocRaw :: WorldOverdraw -> RenderingInput -> [Display] -> Cosmic Coords -> Display
- staticDisplay :: GameState -> Coords -> Display
- displayStatic :: Word32 -> Display
- staticChar :: Word32 -> Char
- getStatic :: GameState -> Coords -> Maybe Word32
Documentation
renderDisplay :: Display -> Widget n Source #
Render a display as a UI widget.
drawLoc :: UIState -> GameState -> Cosmic Coords -> Widget Name Source #
Render the Display
for a specific location.
data RenderingInput Source #
Subset of the game state needed to render the world
displayTerrainCell :: WorldOverdraw -> RenderingInput -> Cosmic Coords -> Display Source #
mkEntityKnowledge :: GameState -> EntityKnowledgeDependencies Source #
Extract the relevant subset of information from the GameState
to be able
to compute whether an entity is "known".
data EntityKnowledgeDependencies Source #
The subset of information required to compute whether an entity is "known", and therefore should be rendered normally vs as a question mark.
getEntityIsKnown :: EntityKnowledgeDependencies -> EntityPaint -> Bool Source #
Determines whether an entity should be rendered normally vs as a question mark.
displayEntityCell :: WorldOverdraw -> RenderingInput -> Cosmic Coords -> [Display] Source #
displayLoc :: Bool -> WorldOverdraw -> GameState -> Cosmic Coords -> Display Source #
:: WorldOverdraw | |
-> RenderingInput | |
-> [Display] | Robot displays |
-> Cosmic Coords | |
-> Display |
staticDisplay :: GameState -> Coords -> Display Source #
Random "static" based on the distance to the robot being
view
ed.
displayStatic :: Word32 -> Display Source #
Draw static given a number from 0-15 representing the state of the four quarter-pixels in a cell
staticChar :: Word32 -> Char Source #
Given a value from 0--15, considered as 4 bits, pick the character with the corresponding quarter pixels turned on.