Fix bug when forming convex hull of game room bounds
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
module Dodge.Render.Picture
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.Update.Camera
|
||||
import Dodge.GameRoom
|
||||
import Dodge.Base
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Zone
|
||||
@@ -62,10 +64,11 @@ customMouseCursor w =
|
||||
$ pictures [ line [V2 (-5) 0,V2 5 0] , line [V2 0 (-5),V2 0 5] ]
|
||||
|
||||
testPic :: World -> Picture
|
||||
testPic _ = pictures
|
||||
[
|
||||
-- , fixedSizePicClampArrow 10 50 thepic (mouseWorldPos w) w
|
||||
]
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user