app

Safe Haskell None
Language Haskell2010

WorldView

Description

Module displaying the world map, which is the first view in legendary edition as well as the view between levels.

Synopsis

Documentation

backgroundPositionY :: Nat -> Nat #

Given the y (in number of cells) of the top left cell, the corresponding background-position-y css attribute for displaying the world map appropriately

encounterView :: Model -> Int -> Int -> Int -> Encounter -> [View action] #

encounterView shared z x y e returns the views for the encounter e. x and y are relative (to the enclosing container) pixel values. They are not cell coordinates.

tileView :: Model -> Int -> Int -> Int -> Tile -> View action #

legendDiv :: World -> View a #

The div showing the legend for the character

absCoordToPx :: World -> Coord -> (Int, Int) #

Converts an absolute coordinate like (25,43) to relative pixels

relCoordToPx :: Coord -> (Int, Int) #

Converts a relative coordinate like (5,4) to relative pixels

cellsHeight :: Int #

The height of the view, in number of cells

cellsWidth :: Int #

The width of the view, in number of cells

mkInitialModel :: Model -> World #

The initial model, for when the game starts

both :: Bifunctor p => (a -> d) -> p a a -> p d d #

shift :: T -> World -> World #

Shifts the world's position by the given direction, if possible