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

