Restrict some arguments
This commit is contained in:
@@ -276,7 +276,7 @@ drawFarWallDetect w =
|
||||
, fst $ collidePoint p q $ filter wlIsOpaque $ wlsNearSeg p q w
|
||||
]
|
||||
)
|
||||
$ getViewpoints p w
|
||||
$ getViewpoints p (_cWorld w)
|
||||
-- $ runIdentity $ S.toList_ $ streamViewpoints p w
|
||||
where
|
||||
p = w ^. cWorld . lWorld . camPos . camViewFrom
|
||||
@@ -411,8 +411,8 @@ drawPathing cfig w =
|
||||
dispInc (p, n) = setDepth 2 . uncurryV translate p . scale 0.1 0.1 $ text $ show n
|
||||
gr = w ^. cWorld . lWorld . pathGraph
|
||||
|
||||
crDisplayInfo :: Configuration -> World -> Creature -> Maybe (Point2, [String])
|
||||
crDisplayInfo cfig w cr
|
||||
crDisplayInfo :: Configuration -> CamPos -> Creature -> Maybe (Point2, [String])
|
||||
crDisplayInfo cfig cam cr
|
||||
| _crID cr == 0 = Nothing
|
||||
| crOnScreen =
|
||||
Just
|
||||
@@ -431,7 +431,7 @@ crDisplayInfo cfig w cr
|
||||
| otherwise = Nothing
|
||||
where
|
||||
ap = _crActionPlan cr
|
||||
crOnScreen = pointOnScreen cfig (w ^. cWorld . lWorld . camPos) $ _crPos cr
|
||||
crOnScreen = pointOnScreen cfig cam $ _crPos cr
|
||||
|
||||
fpreShow :: (Show a, Functor f) => String -> f a -> f String
|
||||
fpreShow str = fmap (((rightPad 7 '.' str ++ "...") ++) . show)
|
||||
@@ -440,7 +440,7 @@ drawCrInfo :: Configuration -> World -> Picture
|
||||
drawCrInfo cfig w =
|
||||
setLayer FixedCoordLayer $
|
||||
renderInfoListsAt (2 * hw - 400) 0 cfig w $
|
||||
mapMaybe (crDisplayInfo cfig w) $ IM.elems $ w ^. cWorld . lWorld . creatures
|
||||
mapMaybe (crDisplayInfo cfig (w ^. cWorld . lWorld . camPos)) $ IM.elems $ w ^. cWorld . lWorld . creatures
|
||||
where
|
||||
hw = halfWidth cfig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user