Improvements to rooms and view distances

This commit is contained in:
2022-03-07 09:16:16 +00:00
parent 1364e7c8c8
commit 81830d87a3
12 changed files with 140 additions and 100 deletions
+1
View File
@@ -174,6 +174,7 @@ setViewDistance :: Configuration -> World -> World
setViewDistance cfig w = w & viewDistance
.~ sqrt (halfWidth cfig ** 2 + halfHeight cfig ** 2) / _cameraZoom w
-- TODO consider adding visible/nearby creatures as view points
farWallDist :: Point2 -> Configuration -> World -> Float
farWallDist p cfig w = (winFac /) . min maxViewDistance $ ssfold (> maxViewDistance) findMax 1 vps
where