Remove separate wall color, should be handled by material type

This commit is contained in:
2025-10-23 21:27:14 +01:00
parent 819f0d37ea
commit 3c6d269d00
24 changed files with 136 additions and 123 deletions
+15 -13
View File
@@ -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