21 lines
522 B
Haskell
21 lines
522 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
|
|
:: Configuration
|
|
-> World
|
|
-> ( [((Point2,Point2),Point4)] ,[((Point2,Point2),Point4)] )
|
|
wallsAndWindows cfig w
|
|
= (map f wls, map f wins)
|
|
where
|
|
f wl = (_wlLine wl, _wlColor wl)
|
|
(wins,wls) = partition theTest . IM.elems . IM.filter _wlDraw $ wallsDoubleScreen cfig w
|
|
theTest wl = _wlOpacity wl /= Opaque
|
|
|