Add objects based on walls, called machines

This commit is contained in:
2021-10-31 22:55:02 +00:00
parent 08fa84c1fd
commit 86fdfd260e
23 changed files with 183 additions and 90 deletions
+3 -3
View File
@@ -138,9 +138,8 @@ lineOnScreen w p1 p2 = pointInPolygon p1 sp
sp = screenPolygon w
sps = zip sp (tail sp ++ [head sp])
drawWallFloor :: Wall -> Picture
drawWallFloor wl = if _wlIsSeeThrough wl
drawWallFloor wl = if _wlOpacity wl == SeeThrough
then setDepth 0.9 . color c $ polygon [x,x +.+ n2,y+.+n2, y]
else blank
where
@@ -159,7 +158,8 @@ wallsAndWindows w
= (map f wls, map f wins)
where
f wl = (_wlLine wl, _wlColor wl)
(wins,wls) = partition _wlIsSeeThrough . IM.elems . IM.filter _wlDraw $ wallsDoubleScreen w
(wins,wls) = partition theTest . IM.elems . IM.filter _wlDraw $ wallsDoubleScreen w
theTest wl = _wlOpacity wl /= Opaque
lightsForGloom :: World -> [(Point3,Float,Point3)]
lightsForGloom w = mapMaybe getLS (IM.elems $ _lightSources w) ++ mapMaybe getTLS (_tempLightSources w)