Nub close points for game room boundaries

This commit is contained in:
2021-10-04 09:39:18 +01:00
parent df9a8ea242
commit c8e08d903e
8 changed files with 67 additions and 95 deletions
+8 -6
View File
@@ -7,6 +7,7 @@ import Dodge.Data
import Dodge.Base
import Dodge.Base.Window
import Dodge.Zone
import Dodge.Graph
import Dodge.Picture
import Dodge.Picture.SizeInvariant
import Dodge.Picture.Layer
@@ -43,6 +44,7 @@ worldPictures w = pictures
,concatMapPic drawWallFloor $ wallFloorsToDraw w
,soundPics w
,viewBoundaries w
,drawPathing w
]
where
crIsClose cr = dist (_crPos cr) camCen < winSize
@@ -68,15 +70,15 @@ customMouseCursor w =
testPic :: World -> Picture
testPic _ = []
--testPic w = setLayer 5 $ color green (concatMap (polygonWire . _grBound) grs)
-- <> color yellow (concatMap (\q -> line [p,q]) $ farWallPoints p w)
-- where
-- p = _crPos $ you w
-- grs = filter (pointInOrOnPolygon p . _grBound) (_gameRooms w)
-- where
-- thepic = setDepth 20 . color green . polygon $ rectNSEW 5 (-5) (-5) (5)
--testPic _ = blank
--testPic w = color green . pictures . map (flip thickLine 5 . tflat2) . graphToEdges $ _pathGraph w
--testPic w =
drawPathing :: World -> Picture
drawPathing w
| _debug_pathing (_config w)
= color green . pictures . map (flip thickLine 5 . tflat2) . graphToEdges $ _pathGraph w
| otherwise = []
viewBoundaries :: World -> Picture
viewBoundaries w
| _debug_view_boundaries (_config w)