Set up wall rendering with textures

This commit is contained in:
jgk
2021-03-21 19:45:21 +01:00
parent a7591bb1d7
commit 23fbee3374
4 changed files with 46 additions and 54 deletions
+3 -2
View File
@@ -439,10 +439,11 @@ displayHP n w = translate (halfWidth w-80) (halfHeight w-20) $
scale 0.2 0.2 $ text $ reverse $ take 5 $ (++ repeat ' ') $ reverse $ show
$ _crHP $ _creatures w IM.! n
wallsForGloom :: World -> [(Point2,Point2)]
wallsForGloom w = map (linePairs . _wlLine) $ filter (not . _wlIsSeeThrough)
wallsForGloom :: World -> [((Point2,Point2),Point4)]
wallsForGloom w = map f $ filter (not . _wlIsSeeThrough)
$ IM.elems $ wallsNearZones (zoneOfDoubleScreen w) w
where linePairs (x:y:_) = (x,y)
f wl = (linePairs $ _wlLine wl, _wlColor wl)
lightsForGloom' :: World -> [(Point4)]
lightsForGloom' w = map getLS (IM.elems $ _lightSources w) ++ map getTLS (_tempLightSources w)