| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Swarm.Util.Content
Contents
Description
Utilities for accessing content of the world, by single cells or in bulk for rendering.
Synopsis
- getContentAt :: TerrainMap -> MultiWorld Int e -> Cosmic Coords -> (TerrainType, Maybe e)
- getMapRectangle :: (d -> e) -> (Coords -> (TerrainType, Maybe d)) -> BoundsRectangle -> Grid (PCell e)
- getTerrainEntityColor :: Map WorldAttr PreservableColor -> PCell EntityFacade -> Maybe PreservableColor
Documentation
getContentAt :: TerrainMap -> MultiWorld Int e -> Cosmic Coords -> (TerrainType, Maybe e) Source #
Get the terrain and entity at a single cell
Rendering
getMapRectangle :: (d -> e) -> (Coords -> (TerrainType, Maybe d)) -> BoundsRectangle -> Grid (PCell e) Source #
Get a rectangle of cells for rendering.
Compare to: worldWidget
getTerrainEntityColor :: Map WorldAttr PreservableColor -> PCell EntityFacade -> Maybe PreservableColor Source #
Get the color used to render a single cell