Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -27,7 +27,7 @@ import Picture
|
||||
import SDL (MouseButton (..))
|
||||
|
||||
hudDrawings :: Universe -> Picture
|
||||
hudDrawings uv = case _hudElement $ _hud (_cWorld w) of
|
||||
hudDrawings uv = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
DisplayCarte -> drawCarte cfig w
|
||||
DisplayInventory subinv ->
|
||||
drawInGameHUD uv
|
||||
@@ -55,7 +55,7 @@ inventoryDisplay cfig w = listPicturesAt 0 0 cfig invlist
|
||||
invlist =
|
||||
concatMap (itemText' cr) (IM.toList inv)
|
||||
++ displayFreeSlots
|
||||
++ concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects (_cWorld w))
|
||||
++ concatMap (closeObjectToTextPictures nfreeslots) (w ^. cWorld . lWorld . closeObjects)
|
||||
-- ++ map floorItemsColor (concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects w))
|
||||
-- floorItemsColor = case _hudElement (_hud w) of
|
||||
-- DisplayInventory NoSubInventory -> id
|
||||
@@ -162,7 +162,7 @@ itmInfo mit = fromMaybe [] $ do
|
||||
|
||||
displayTerminal :: Int -> Configuration -> World -> Picture
|
||||
displayTerminal tid cfig w = fromMaybe mempty $ do
|
||||
tm <- w ^? cWorld . terminals . ix tid
|
||||
tm <- w ^? cWorld . lWorld . terminals . ix tid
|
||||
return $
|
||||
pictures
|
||||
[ invHead cfig (_tmTitle tm ++ ":T" ++ show tid)
|
||||
@@ -332,9 +332,9 @@ drawCarte cfig w =
|
||||
++ mapOverlay cfig w
|
||||
++ [mainListCursor white iPos cfig]
|
||||
where
|
||||
iPos = _selLocation (_cWorld w)
|
||||
locs = map (\(_, s) -> (s, white)) . IM.elems . _seenLocations $ _cWorld w
|
||||
locPoss = map (cartePosToScreen cfig w . ($ w) . doWorldPos . fst) . IM.elems . _seenLocations $ _cWorld w
|
||||
iPos = w ^. cWorld . lWorld . selLocation
|
||||
locs = map (\(_, s) -> (s, white)) . IM.elems . _seenLocations . _lWorld $ _cWorld w
|
||||
locPoss = map (cartePosToScreen cfig w . ($ w) . doWorldPos . fst) . IM.elems . _seenLocations . _lWorld $ _cWorld w
|
||||
locTexts = map fst locs
|
||||
|
||||
displayListEndCoords :: Configuration -> [String] -> [Point2]
|
||||
@@ -348,7 +348,7 @@ displayListEndCoords cfig ss = map (doWindowScale cfig) $ zipWith h ss $ map f [
|
||||
mapOverlay :: Configuration -> World -> [Picture]
|
||||
mapOverlay cfig w =
|
||||
(color (withAlpha 0.5 black) . polygon $ reverse $ rectNSWE 1 (-1) 1 (-1)) :
|
||||
(mapMaybe (mapWall cfig w) . IM.elems $ _walls (_cWorld w))
|
||||
(mapMaybe (mapWall cfig w) . IM.elems $ w ^. cWorld . lWorld . walls)
|
||||
|
||||
mapWall :: Configuration -> World -> Wall -> Maybe Picture
|
||||
mapWall cfig w wl =
|
||||
@@ -445,5 +445,4 @@ displayHP cid cfig w =
|
||||
. text
|
||||
. leftPad 5 ' '
|
||||
. show
|
||||
. _crHP
|
||||
$ _creatures (_cWorld w) IM.! cid
|
||||
$ w ^?! cWorld . lWorld . creatures . ix cid . crHP
|
||||
|
||||
Reference in New Issue
Block a user