Minor tweaking, argument refining
This commit is contained in:
@@ -92,7 +92,7 @@ subInventoryDisplay subinv cfig w = case subinv of
|
||||
, invHead cfig "TWEAK"
|
||||
, listPicturesAt subInvX 60 cfig $ map text (ammoTweakStrings it)
|
||||
]
|
||||
DisplayTerminal tid -> displayTerminal tid cfig w
|
||||
DisplayTerminal tid -> displayTerminal tid cfig (w ^. cWorld . lWorld)
|
||||
CombineInventory mi ->
|
||||
pictures
|
||||
[ invHead cfig "COMBINE"
|
||||
@@ -160,9 +160,9 @@ itmInfo mit = fromMaybe [] $ do
|
||||
itm <- mit
|
||||
return (map show . M.assocs . _iyModules $ _itType itm)
|
||||
|
||||
displayTerminal :: Int -> Configuration -> World -> Picture
|
||||
displayTerminal :: Int -> Configuration -> LWorld -> Picture
|
||||
displayTerminal tid cfig w = fromMaybe mempty $ do
|
||||
tm <- w ^? cWorld . lWorld . terminals . ix tid
|
||||
tm <- w ^? terminals . ix tid
|
||||
return $
|
||||
pictures
|
||||
[ invHead cfig (_tmTitle tm ++ ":T" ++ show tid)
|
||||
@@ -334,7 +334,7 @@ drawCarte cfig w =
|
||||
where
|
||||
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
|
||||
locPoss = map (cartePosToScreen cfig (w ^. cWorld . lWorld . hud) . ($ w) . doWorldPos . fst) . IM.elems . _seenLocations . _lWorld $ _cWorld w
|
||||
locTexts = map fst locs
|
||||
|
||||
displayListEndCoords :: Configuration -> [String] -> [Point2]
|
||||
@@ -348,12 +348,12 @@ 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 $ w ^. cWorld . lWorld . walls)
|
||||
(mapMaybe (mapWall cfig (w ^. cWorld . lWorld . hud)) . IM.elems $ w ^. cWorld . lWorld . walls)
|
||||
|
||||
mapWall :: Configuration -> World -> Wall -> Maybe Picture
|
||||
mapWall cfig w wl =
|
||||
mapWall :: Configuration -> HUD -> Wall -> Maybe Picture
|
||||
mapWall cfig thehud wl =
|
||||
if _wlSeen wl
|
||||
then Just . color c . polygon $ map (cartePosToScreen cfig w) [x, x +.+ n2, y +.+ n2, y]
|
||||
then Just . color c . polygon $ map (cartePosToScreen cfig thehud) [x, x +.+ n2, y +.+ n2, y]
|
||||
else Nothing
|
||||
where
|
||||
t = normalizeV (y -.- x)
|
||||
|
||||
@@ -291,7 +291,7 @@ drawDDATest w =
|
||||
<> setLayer DebugLayer (color yellow (line [cvf, mwp]))
|
||||
where
|
||||
cvf = w ^. cWorld . lWorld . camPos . camViewFrom
|
||||
mwp = mouseWorldPos w
|
||||
mwp = mouseWorldPos (w ^. input) (w ^. cWorld . lWorld . camPos)
|
||||
--ps = ddaStreamX 50 cvf mwp
|
||||
ps = zoneOfSeg 50 cvf mwp
|
||||
|
||||
@@ -378,7 +378,7 @@ drawMousePosition cfig w =
|
||||
$ shortPoint2 mwp
|
||||
where
|
||||
p = worldPosToScreen (w ^. cWorld . lWorld . camPos) mwp
|
||||
mwp = mouseWorldPos w
|
||||
mwp = mouseWorldPos (w ^. input) (w ^. cWorld . lWorld . camPos)
|
||||
|
||||
drawWlIDs :: Configuration -> World -> Picture
|
||||
drawWlIDs cfig w = setLayer FixedCoordLayer $ foldMap f (w ^. cWorld . lWorld . walls)
|
||||
|
||||
Reference in New Issue
Block a user