Minor cleanup
This commit is contained in:
+10
-10
@@ -4,9 +4,9 @@ of a position and a rotation.
|
||||
The last link in the list is considered the incoming link, the other links are
|
||||
the outgoing links. -}
|
||||
module Dodge.Room.Link
|
||||
( shiftRoomToLink
|
||||
( --shiftRoomToLink
|
||||
--, shiftRoomShiftToLink
|
||||
, shiftRoomShiftToLink'
|
||||
shiftRoomShiftToLink'
|
||||
, shiftRoomBy
|
||||
, shiftLinkBy
|
||||
, doRoomShift
|
||||
@@ -92,14 +92,14 @@ changeLinkTo cond r = do
|
||||
an external point and direction.
|
||||
This is intended to work when the external point is an outgoing link from another room.
|
||||
-}
|
||||
shiftRoomToLink :: (Point2,Float) -> Room -> Room
|
||||
shiftRoomToLink l r
|
||||
= shiftRoomBy l
|
||||
. shiftRoomBy (V2 0 0 , pi-a)
|
||||
$ shiftRoomBy (V2 0 0 -.- p , 0)
|
||||
r
|
||||
where
|
||||
(p,a) = lnkPosDir $ head $ _rmInLinks r
|
||||
--shiftRoomToLink :: (Point2,Float) -> Room -> Room
|
||||
--shiftRoomToLink l r
|
||||
-- = shiftRoomBy l
|
||||
-- . shiftRoomBy (V2 0 0 , pi-a)
|
||||
-- $ shiftRoomBy (V2 0 0 -.- p , 0)
|
||||
-- r
|
||||
-- where
|
||||
-- (p,a) = lnkPosDir $ head $ _rmInLinks r
|
||||
|
||||
doRoomShift :: Room -> Room
|
||||
doRoomShift rm = shiftRoomBy (_rmShift rm) rm & rmShift .~ _rmShift rm
|
||||
|
||||
Reference in New Issue
Block a user