Minor cleanup

This commit is contained in:
2021-11-23 20:48:31 +00:00
parent 1f2d767d5e
commit b7d6eeaa84
4 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ import Dodge.PlacementSpot
import Geometry
import Tile
import Data.Bifunctor
--import Data.Bifunctor
{- | First exit due north, two other exits at angles next to this.
Entrance from south. -}
corridor :: Room
@@ -35,7 +35,7 @@ corridor = defaultRoom
,uncurry inLink ((V2 20 10) ,pi)
]
lnks =
[ ((V2 20 70) ,0)
[ ((V2 20 70) ,0::Float)
, ((V2 20 70), pi/6)
, ((V2 20 70), negate $ pi/6)
,((V2 20 10) ,pi)
@@ -93,7 +93,7 @@ tEast = defaultRoom
}
where
lnks =
[(V2 ( 30) (60),-pi/2)
[(V2 ( 30) (60),(-pi/2)::Float)
,(V2 (-30) (60),pi/2)
,((V2 0 10),pi)
]
+10 -10
View File
@@ -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
+1 -1
View File
@@ -7,7 +7,7 @@ import Dodge.Creature
--import Dodge.Creature.Inanimate
import Dodge.LevelGen.Data
import Dodge.Room.Procedural
import Dodge.Room.Link
--import Dodge.Room.Link
import Dodge.RandomHelp
--import Dodge.LevelGen.Data
import Geometry.Data
+1 -1
View File
@@ -6,7 +6,7 @@ import Dodge.RoomLink
import Dodge.Room.LasTurret
import Dodge.Data
import Dodge.Default
import Dodge.RoomLink
--import Dodge.RoomLink
import Dodge.Tree
import Dodge.RandomHelp
import Dodge.Room.Door