Tweak picture layers
This commit is contained in:
@@ -15,6 +15,7 @@ import Polyhedra.Data
|
||||
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Data.List (partition)
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
|
||||
worldPictures :: World -> Picture
|
||||
@@ -198,26 +199,14 @@ drawFFShadow w ff
|
||||
, x +.+ ((0.1 + j) *.* (x -.- ypShift))
|
||||
, y +.+ ((0.1 + j) *.* (y -.- ypShift))
|
||||
, y]
|
||||
|
||||
wallsPointsAndCols :: World -> [((Point2,Point2),Point4)]
|
||||
wallsPointsAndCols w
|
||||
= (map f . filter (not . _wlIsSeeThrough) . IM.elems $ wallsNearZones (zoneOfDoubleScreen w) w)
|
||||
where
|
||||
f wl = (_wlLine wl, _wlColor wl)
|
||||
|
||||
staticWallsOnScreen :: World -> [((Point2,Point2),Point4)]
|
||||
staticWallsOnScreen w
|
||||
= map f
|
||||
. concat
|
||||
$ catMaybes [IM.lookup x (_staticWalls w) >>= IM.lookup y | (x,y) <- zoneOfDoubleScreen w]
|
||||
wallsAndWindows
|
||||
:: World
|
||||
-> ( [((Point2,Point2),Point4)] ,[((Point2,Point2),Point4)] )
|
||||
wallsAndWindows w
|
||||
= (map f wls, map f $ filter (fromMaybe True . (^? blVisible)) wins)
|
||||
where
|
||||
f wl = (_wlLine' wl, _wlColor' wl)
|
||||
|
||||
wallsWindows :: World -> [((Point2,Point2),Point4)]
|
||||
wallsWindows w = map f . filter (fromMaybe True . (^? blVisible)) .
|
||||
filter _wlIsSeeThrough . IM.elems $ wallsNearZones (zoneOfDoubleScreen w) w
|
||||
where
|
||||
f wl = (_wlLine wl, _wlColor wl)
|
||||
(wins,wls) = partition _wlIsSeeThrough . IM.elems $ wallsDoubleScreen w
|
||||
|
||||
lightsForGloom :: World -> [(Point3,Float,Float)]
|
||||
lightsForGloom w = map getLS (IM.elems $ _lightSources w) ++ map getTLS (_tempLightSources w)
|
||||
|
||||
Reference in New Issue
Block a user