Reorganise render collections

This commit is contained in:
2021-11-01 02:15:22 +00:00
parent da346bc3a0
commit 7692421112
6 changed files with 76 additions and 186 deletions
+19
View File
@@ -0,0 +1,19 @@
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