Cleanup warnings

This commit is contained in:
2021-05-17 22:39:18 +02:00
parent d7fcdbf550
commit 69f915a894
102 changed files with 1243 additions and 1185 deletions
+14 -6
View File
@@ -64,7 +64,7 @@ shiftRoomToLink l r
(p,a) = last $ _rmLinks r
shiftRoomBy :: (Point2,Float) -> Room -> Room
shiftRoomBy shift@(pos,rot) r =
shiftRoomBy shift r =
over rmPolys (fmap (map (shiftPointBy shift)))
$ over rmLinks (fmap (shiftLinkBy shift))
$ over rmPath (map (shiftPathPointBy shift))
@@ -72,14 +72,22 @@ shiftRoomBy shift@(pos,rot) r =
$ over rmBound (fmap (map (shiftPointBy shift)))
r
shiftLinkBy
:: (Point2,Float)
-> (Point2,Float)
-> (Point2,Float)
shiftLinkBy (pos,rot) (p,r) = (shiftPointBy (pos,rot) p, r + rot)
shiftPSBy
:: (Point2,Float)
-> Placement
-> Placement
shiftPSBy (pos,rot) ps = ps
& placementSpot . psPos %~ shiftPointBy (pos,rot)
& placementSpot . psRot %~ (+ rot)
--shiftPSBy (pos,rot) ps = case ps of
-- PS {} -> over psPos (shiftPointBy (pos,rot))
-- $ over psRot (+rot)
-- ps
shiftPathPointBy
:: (Point2,Float)
-> (Point2,Point2)
-> (Point2,Point2)
shiftPathPointBy s (p1,p2) = (shiftPointBy s p1, shiftPointBy s p2)