Cleanup
This commit is contained in:
@@ -22,13 +22,13 @@ addRoomLinkDecorations rms w =
|
||||
%~ IM.insertWithNewKeys (map roomLinkDecorations rms)
|
||||
|
||||
roomLinkDecorations :: Room -> Picture
|
||||
roomLinkDecorations rm = pictures . map (linkDecoration . lnkPosDir) $ _rmLinks rm
|
||||
roomLinkDecorations rm = foldMap (linkDecoration . lnkPosDir) $ _rmLinks rm
|
||||
|
||||
linkDecoration :: (Point2, Float) -> Picture
|
||||
linkDecoration (p, a) = setLayer DebugLayer . color red $ line [p, p +.+ 20 *.* unitVectorAtAngle (a - pi / 2)]
|
||||
|
||||
roomPolyDecorations :: Room -> Picture
|
||||
roomPolyDecorations rm = pictures . map polyWireFrame $ _rmPolys rm
|
||||
roomPolyDecorations rm = foldMap polyWireFrame $ _rmPolys rm
|
||||
|
||||
polyWireFrame :: [Point2] -> Picture
|
||||
polyWireFrame (x : xs) = setLayer DebugLayer . setDepth 50 . color green $ line $ (x : xs) ++ [x]
|
||||
|
||||
@@ -33,13 +33,13 @@ import Dodge.Render.Label
|
||||
import Dodge.WorldEvent.ThingsHit
|
||||
|
||||
printPoint :: Point2 -> Picture
|
||||
printPoint p = color white $ uncurryV translate p $ pictures [circle 3, scale 0.05 0.05 $ text (show p)]
|
||||
printPoint p = color white $ uncurryV translate p $ fold [circle 3, scale 0.05 0.05 $ text (show p)]
|
||||
|
||||
printRotPoint :: Float -> Point2 -> Picture
|
||||
printRotPoint r p =
|
||||
color white
|
||||
. uncurryV translate p
|
||||
$ pictures [circle 3, rotate (negate r) $ scale 0.1 0.1 $ text (show p)]
|
||||
$ fold [circle 3, rotate (negate r) $ scale 0.1 0.1 $ text (show p)]
|
||||
|
||||
outsideScreenPolygon :: Configuration -> Camera -> [Point2]
|
||||
outsideScreenPolygon cfig w = [tr, tl, bl, br]
|
||||
@@ -150,7 +150,7 @@ debugDraw' cfig w bl = case bl of
|
||||
Show_zone_near_point_cursor -> drawZoneNearPointCursor w
|
||||
Inspect_wall -> drawInspectWalls w
|
||||
Cr_awareness -> drawCreatureDisplayTexts w
|
||||
Show_sound -> pictures $ M.map (soundPic cfig w) $ _playingSounds w
|
||||
Show_sound -> fold $ M.map (soundPic cfig w) $ _playingSounds w
|
||||
Cr_status -> drawCrInfo cfig w
|
||||
Mouse_position -> drawMousePosition w
|
||||
Walls_info -> drawWlIDs w
|
||||
|
||||
Reference in New Issue
Block a user