Files
loop/src/Dodge/Render/Walls.hs
T
2021-11-01 02:15:22 +00:00

20 lines
491 B
Haskell

module Dodge.Render.Walls
( wallsAndWindows
) where
import Dodge.Data
import Dodge.Zone
import Geometry
import Data.List
import qualified Data.IntMap.Strict as IM
wallsAndWindows
:: World
-> ( [((Point2,Point2),Point4)] ,[((Point2,Point2),Point4)] )
wallsAndWindows w
= (map f wls, map f wins)
where
f wl = (_wlLine wl, _wlColor wl)
(wins,wls) = partition theTest . IM.elems . IM.filter _wlDraw $ wallsDoubleScreen w
theTest wl = _wlOpacity wl /= Opaque