Remove separate wall color, should be handled by material type
This commit is contained in:
+15
-13
@@ -1,11 +1,10 @@
|
||||
module Dodge.Render.Walls (
|
||||
wallsToDraw,
|
||||
) where
|
||||
module Dodge.Render.Walls (wallsToDraw) where
|
||||
|
||||
import qualified Control.Foldl as L
|
||||
import Control.Lens
|
||||
import Dodge.Base.Wall
|
||||
import Dodge.Data.World
|
||||
import Dodge.Material.Color
|
||||
import Dodge.Wall.Draw
|
||||
--import Dodge.Zoning.Base
|
||||
--import Dodge.Zoning.Wall
|
||||
@@ -14,17 +13,20 @@ import Geometry
|
||||
import ShapePicture
|
||||
|
||||
-- not necessary: should just poke all walls to their wanted places
|
||||
wallsToDraw :: World -> ( [((Point2, Point2), Point4)], SPic, [Wall])
|
||||
wallsToDraw w = L.fold
|
||||
( (,,)
|
||||
<$>L.prefilter wlSeeThroughDraw (L.premap f L.list)
|
||||
<*> L.premap getWallSPic L.mconcat
|
||||
<*> L.prefilter wlOpaqueDraw L.list
|
||||
)
|
||||
(w ^. cWorld . lWorld . walls)
|
||||
-- (wlsFromIXs w $ zonesExtract (w ^. wlZoning) $ zoneOfSight wlZoneSize cam)
|
||||
wallsToDraw :: World -> ([((Point2, Point2), Point4)], SPic, [Wall])
|
||||
wallsToDraw w =
|
||||
L.fold
|
||||
( (,,)
|
||||
<$> L.prefilter wlSeeThroughDraw (L.premap f L.list)
|
||||
<*> L.premap getWallSPic L.mconcat
|
||||
<*> L.prefilter wlOpaqueDraw L.list
|
||||
)
|
||||
(w ^. cWorld . lWorld . walls)
|
||||
where
|
||||
f wl = (_wlLine wl, _wlColor wl)
|
||||
-- (wlsFromIXs w $ zonesExtract (w ^. wlZoning) $ zoneOfSight wlZoneSize cam)
|
||||
|
||||
f wl = (_wlLine wl, materialColor $ _wlMaterial wl)
|
||||
|
||||
-- cam = w ^. cWorld . camPos
|
||||
|
||||
--wallsToDraw
|
||||
|
||||
Reference in New Issue
Block a user