Start implementing location display on map
This commit is contained in:
@@ -41,22 +41,22 @@ worldPictures w
|
||||
|
||||
fixedCoordPictures :: World -> Picture
|
||||
fixedCoordPictures w = pictures
|
||||
[ hudIfNoMap
|
||||
[ scaler $ hudDrawings w
|
||||
, scaler . onLayer MenuLayer $ menuScreen w
|
||||
, setDepth (-1) $ closeObjectTexts w
|
||||
]
|
||||
where scaler = setDepth (-1) . scale (2 / _windowX w) (2 / _windowY w)
|
||||
hudIfNoMap = case _mapDisplay w of
|
||||
(True,_) -> blank
|
||||
_ -> scaler $ hudDrawings w
|
||||
|
||||
|
||||
mapOverlay :: World -> [Picture]
|
||||
mapOverlay w = case _mapDisplay w of
|
||||
(True,mapZoom) -> map ( setLayer 1 . setDepth (-1) . doZoom)
|
||||
(True,mapZoom) -> (setLayer 1 . setDepth (-1) . color (withAlpha 0.5 black)
|
||||
. polygon $ screenPolygon w)
|
||||
:
|
||||
(map ( setLayer 1 . setDepth (-1) . doZoom )
|
||||
. mapMaybe mapWall
|
||||
. IM.elems
|
||||
$ _walls w
|
||||
)
|
||||
where
|
||||
doZoom = uncurry translate (_cameraPos w)
|
||||
. scale zoom zoom
|
||||
|
||||
Reference in New Issue
Block a user