Cleanup, split CWorld into separate file
This commit is contained in:
@@ -207,22 +207,22 @@ drawPathBetween w = setLayer DebugLayer
|
||||
where
|
||||
nodepos = (`getNodePos` w)
|
||||
nodelist = makePathBetween sp ep w
|
||||
sp = _lSelect (_cWorld w)
|
||||
ep = _rSelect (_cWorld w)
|
||||
sp = _lSelect w
|
||||
ep = _rSelect w
|
||||
|
||||
drawNodesNearSelect :: World -> Picture
|
||||
drawNodesNearSelect w = setLayer DebugLayer
|
||||
$ runIdentity (S.foldMap_ (drawZoneCol orange pnZoneSize) (zoneAroundPoint pnZoneSize sp))
|
||||
<> color green (drawCross sp)
|
||||
where
|
||||
sp = _lSelect (_cWorld w)
|
||||
sp = _lSelect w
|
||||
|
||||
drawInspectWalls :: World -> Picture
|
||||
drawInspectWalls w = foldMap (drawInspectWall w)
|
||||
$ filter (isJust . uncurry (intersectSegSeg a b) . _wlLine)
|
||||
$ IM.elems $ _walls (_cWorld w)
|
||||
where
|
||||
(a,b) = _lLine (_cWorld w)
|
||||
(a,b) = _lLine w
|
||||
|
||||
drawInspectWall :: World -> Wall -> Picture
|
||||
drawInspectWall w wl = setLayer DebugLayer
|
||||
@@ -252,8 +252,8 @@ drawWorldSelect w = setLayer DebugLayer
|
||||
$ color cyan (line [a,b])
|
||||
<> color magenta (line [c,d])
|
||||
where
|
||||
(a,b) = _lLine (_cWorld w)
|
||||
(c,d) = _rLine (_cWorld w)
|
||||
(a,b) = _lLine w
|
||||
(c,d) = _rLine w
|
||||
|
||||
drawFarWallDetect :: World -> Picture
|
||||
drawFarWallDetect w = setLayer DebugLayer
|
||||
|
||||
Reference in New Issue
Block a user