Cleanup compiler warnings
This commit is contained in:
+14
-14
@@ -1,3 +1,4 @@
|
||||
{-# OPTIONS -Wno-incomplete-uni-patterns #-}
|
||||
module Dodge.Debug.Picture where
|
||||
|
||||
import Control.Lens
|
||||
@@ -5,19 +6,21 @@ import Data.Foldable
|
||||
import qualified Data.Graph.Inductive as FGL
|
||||
import qualified Data.Map.Strict as M
|
||||
import Data.Maybe
|
||||
import qualified Data.Set as S
|
||||
import Dodge.Base
|
||||
import Dodge.Creature.Picture.Awareness
|
||||
import Dodge.Data.Universe
|
||||
|
||||
import Dodge.GameRoom
|
||||
import Dodge.Graph
|
||||
import Dodge.Path
|
||||
import Dodge.Picture.SizeInvariant
|
||||
import Dodge.Render.InfoBox
|
||||
import Dodge.Render.Label
|
||||
import Dodge.Render.List
|
||||
import Dodge.ShortShow
|
||||
import Dodge.SoundLogic.LoadSound
|
||||
import Dodge.Viewpoints
|
||||
import Dodge.WorldEvent.ThingsHit
|
||||
import Dodge.Zoning
|
||||
import Dodge.Zoning.Base
|
||||
import Geometry
|
||||
@@ -28,9 +31,6 @@ import Picture
|
||||
import SDL (MouseButton (..))
|
||||
import ShortShow
|
||||
import Sound.Data
|
||||
import qualified Data.Set as S
|
||||
import Dodge.Render.Label
|
||||
import Dodge.WorldEvent.ThingsHit
|
||||
|
||||
printPoint :: Point2 -> Picture
|
||||
printPoint p = color white $ uncurryV translate p $ fold [circle 3, scale 0.05 0.05 $ text (show p)]
|
||||
@@ -107,11 +107,13 @@ drawCollisionTest w = fromMaybe mempty $ do
|
||||
return $
|
||||
setLayer DebugLayer (color orange $ line [a, b])
|
||||
<> foldMap (drawCrossCol red . fst) (thingHit a b w)
|
||||
|
||||
-- <> foldMap (drawCross . _crPos) (crsNearSeg a b w)
|
||||
-- <> foldMap (drawZoneCol green crZoneSize . zoneOfPoint crZoneSize) (xIntercepts crZoneSize a b)
|
||||
-- <> foldMap (drawZoneCol yellow crZoneSize . zoneOfPoint crZoneSize) (yIntercepts' crZoneSize a b)
|
||||
-- <> foldMap (drawLabCrossCol blue) (xIntercepts crZoneSize a b)
|
||||
|
||||
-- # OPTIONS -Wno-incomplete-uni-patterns #-}
|
||||
drawZoneCol :: Color -> Float -> V2 Int -> Picture
|
||||
drawZoneCol col s (V2 x y) = setLayer DebugLayer . color col $ thickLine 2 (p : ps ++ [p])
|
||||
where
|
||||
@@ -337,7 +339,6 @@ drawWlIDs w = setLayer FixedCoordLayer $ foldMap f (w ^. cWorld . lWorld . walls
|
||||
where
|
||||
p = worldPosToScreen (w ^. wCam) $ 0.5 *.* uncurry (+.+) (_wlLine wl)
|
||||
|
||||
|
||||
drawCrInfo :: Configuration -> World -> Picture
|
||||
drawCrInfo cfig w =
|
||||
setLayer FixedCoordLayer $
|
||||
@@ -345,14 +346,14 @@ drawCrInfo cfig w =
|
||||
mapMaybe crDisplayInfo $ IM.elems $ w ^. cWorld . lWorld . creatures
|
||||
where
|
||||
cam = w ^. wCam
|
||||
-- drawPathing :: Configuration -> World -> Picture
|
||||
-- drawPathing cfig w =
|
||||
-- setLayer DebugLayer $
|
||||
-- foldMap (edgeToPic (screenPolygon cfig (w ^. wCam)) . (^?! _3)) (FGL.labEdges gr)
|
||||
-- <> foldMap dispInc (graphToIncidence gr)
|
||||
-- where
|
||||
-- dispInc (p, n) = setDepth 2 . uncurryV translate p . scale 0.1 0.1 $ text $ show n
|
||||
-- gr = w ^. cWorld . pathGraph
|
||||
-- drawPathing :: Configuration -> World -> Picture
|
||||
-- drawPathing cfig w =
|
||||
-- setLayer DebugLayer $
|
||||
-- foldMap (edgeToPic (screenPolygon cfig (w ^. wCam)) . (^?! _3)) (FGL.labEdges gr)
|
||||
-- <> foldMap dispInc (graphToIncidence gr)
|
||||
-- where
|
||||
-- dispInc (p, n) = setDepth 2 . uncurryV translate p . scale 0.1 0.1 $ text $ show n
|
||||
-- gr = w ^. cWorld . pathGraph
|
||||
|
||||
crDisplayInfo :: Creature -> Maybe (Point2, [String])
|
||||
crDisplayInfo cr
|
||||
@@ -396,4 +397,3 @@ edgeToPic poly pe
|
||||
where
|
||||
sp = _peStart pe
|
||||
ep = _peEnd pe
|
||||
|
||||
|
||||
Reference in New Issue
Block a user