Cleanup
This commit is contained in:
@@ -30,7 +30,7 @@ roomGlassOctogon x = createPathGrid $ defaultRoom
|
||||
[rectNSWE x (-x) (-x) x
|
||||
,rectNSWE 0 (-(x + 40)) (-20) 20
|
||||
]
|
||||
, _rmLinks = (map (uncurry outLink) $ init lnks) ++ [uncurry inLink $ last lnks]
|
||||
, _rmLinks = map (uncurry outLink) (init lnks) ++ [uncurry inLink $ last lnks]
|
||||
, _rmPath = linksAndPath lnks
|
||||
[ ( V2 0 x , V2 0 (-(x+40)))
|
||||
, ( V2 0 (-(x+40)), V2 0 x)
|
||||
@@ -94,7 +94,7 @@ roomCross x y = defaultRoom
|
||||
,(V2 (-x) (20-y),pi/2)
|
||||
,(V2 (20-y) (-x),pi)
|
||||
] ++
|
||||
[uncurry inLink $ (V2 (y-20) (-x),pi)
|
||||
[uncurry inLink (V2 (y-20) (-x),pi)
|
||||
]
|
||||
, _rmPath = []
|
||||
, _rmPmnts =
|
||||
|
||||
+20
-19
@@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
module Dodge.Room.Corridor
|
||||
where
|
||||
import Dodge.LevelGen.Data
|
||||
@@ -19,7 +20,7 @@ corridor = defaultRoom
|
||||
{ _rmPolys = [poly]
|
||||
, _rmLinks = lnks'
|
||||
, _rmPath = concatMap (doublePair . (,) (V2 20 60) . fst) lnks
|
||||
, _rmPmnts = [ spanLightI (V2 0 40) (V2 40 40) ]
|
||||
, _rmPmnts = [ spanLightI (V2 0 40) (V2 40 40) ]
|
||||
, _rmBound = [ rectNSWE 50 30 0 40 ]
|
||||
, _rmFloor = [makeTileFromPoly poly 2]
|
||||
, _rmRandPSs = [psRandRanges (10,30) (30,60) (0,2*pi)]
|
||||
@@ -28,16 +29,16 @@ corridor = defaultRoom
|
||||
where
|
||||
poly = rectNSWE 80 0 0 40
|
||||
lnks' =
|
||||
[uncurry outLink ((V2 20 70) ,0)
|
||||
,uncurry outLink ((V2 20 70), pi/6)
|
||||
,uncurry outLink ((V2 20 70), negate $ pi/6)
|
||||
,uncurry inLink ((V2 20 10) ,pi)
|
||||
[uncurry outLink (V2 20 70 , 0)
|
||||
,uncurry outLink (V2 20 70 , pi/6)
|
||||
,uncurry outLink (V2 20 70 , negate $ pi/6)
|
||||
,uncurry inLink (V2 20 10 , pi)
|
||||
]
|
||||
lnks =
|
||||
[ ((V2 20 70) ,0::Float)
|
||||
, ((V2 20 70), pi/6)
|
||||
, ((V2 20 70), negate $ pi/6)
|
||||
,((V2 20 10) ,pi)
|
||||
[ (V2 20 70, 0::Float)
|
||||
, (V2 20 70, pi/6)
|
||||
, (V2 20 70, negate $ pi/6)
|
||||
, (V2 20 10, pi)
|
||||
]
|
||||
keyholeCorridor :: Room
|
||||
keyholeCorridor = corridor
|
||||
@@ -90,14 +91,14 @@ tEast = defaultRoom
|
||||
}
|
||||
where
|
||||
lnks =
|
||||
[(V2 ( 30) (60),(-pi/2)::Float)
|
||||
,(V2 (-30) (60),pi/2)
|
||||
,((V2 0 10),pi)
|
||||
[(V2 30 60, (-pi/2)::Float)
|
||||
,(V2 (-30) 60, pi/2 )
|
||||
,(V2 0 10, pi )
|
||||
]
|
||||
lnks' =
|
||||
[uncurry outLink(V2 ( 30) (60),-pi/2)
|
||||
,uncurry outLink(V2 (-30) (60),pi/2)
|
||||
,uncurry inLink((V2 0 10),pi)
|
||||
[uncurry outLink (V2 30 60,-pi/2)
|
||||
,uncurry outLink (V2 (-30) 60,pi/2)
|
||||
,uncurry inLink (V2 0 10,pi)
|
||||
]
|
||||
tWest :: Room
|
||||
tWest = defaultRoom
|
||||
@@ -105,13 +106,13 @@ tWest = defaultRoom
|
||||
,rectNSWE 80 40 (-40) 40
|
||||
]
|
||||
, _rmLinks = lnks
|
||||
, _rmPath = concatMap (doublePair . (,) (V2 0 60) . fst) $ map lnkPosDir lnks
|
||||
, _rmPath = concatMap (doublePair . (V2 0 60 ,) . _rlPos) lnks
|
||||
, _rmPmnts = []
|
||||
, _rmBound = [ rectNSWE 70 10 0 40 ]
|
||||
}
|
||||
where
|
||||
lnks =
|
||||
[outLink (V2 (-30) (60)) (pi/2)
|
||||
,outLink (V2 ( 30) (60)) (-pi/2)
|
||||
,inLink (V2 (0) (10)) pi
|
||||
[outLink (V2 (-30) 60) ( pi/2)
|
||||
,outLink (V2 30 60) (-pi/2)
|
||||
,inLink (V2 0 10) pi
|
||||
]
|
||||
|
||||
@@ -6,7 +6,7 @@ the outgoing links. -}
|
||||
module Dodge.Room.Link
|
||||
( --shiftRoomToLink
|
||||
--, shiftRoomShiftToLink
|
||||
shiftRoomShiftToLink'
|
||||
shiftRoomShiftToLink
|
||||
, shiftRoomBy
|
||||
, shiftLinkBy
|
||||
, doRoomShift
|
||||
@@ -129,8 +129,8 @@ shiftRoomBy shift r = r
|
||||
-- where
|
||||
-- (p,a) = head $ _rmInLinks r
|
||||
|
||||
shiftRoomShiftToLink' :: (Point2,Float) -> (Point2,Float) -> Room -> Room
|
||||
shiftRoomShiftToLink' l inlink r
|
||||
shiftRoomShiftToLink :: (Point2,Float) -> (Point2,Float) -> Room -> Room
|
||||
shiftRoomShiftToLink l inlink r
|
||||
= shiftRoomShiftBy l
|
||||
. shiftRoomShiftBy (V2 0 0 , pi-a)
|
||||
$ shiftRoomShiftBy (V2 0 0 -.- p , 0)
|
||||
|
||||
@@ -32,7 +32,9 @@ litCorridor90 = do
|
||||
poly2 = rectNSWE (h-60) (h-100) (-60) 5
|
||||
pure $ defaultRoom
|
||||
{ _rmPolys = [poly,poly2]
|
||||
, _rmLinks = [uncurry outLink (V2 40 (h - 80), -pi/2)] ++ [uncurry inLink (V2 20 0 , pi ) ]
|
||||
, _rmLinks =
|
||||
[ outLink (V2 40 (h - 80)) (-pi/2)
|
||||
, inLink (V2 20 0 ) pi ]
|
||||
, _rmPath = concatMap doublePair
|
||||
[( V2 20 0 , V2 20 (h-40) )
|
||||
,( V2 0 (h-40) , V2 20 (h-40) )
|
||||
@@ -94,8 +96,8 @@ lasTunnel :: Room
|
||||
lasTunnel = defaultRoom
|
||||
{ _rmPolys = polys
|
||||
, _rmBound = polys
|
||||
, _rmLinks = [uncurry outLink(V2 20 190,1.5* pi)] ++ [uncurry inLink(V2 0 20,0.5* pi)]
|
||||
, _rmPmnts = [putLasTurret 0.005 & plSpot .~ PS (V2 10 240) (1.5*pi)
|
||||
, _rmLinks = [outLink (V2 20 190) (1.5* pi), inLink (V2 0 20) (0.5* pi)]
|
||||
, _rmPmnts = [putLasTurret 0.005 & plSpot .~ PS (V2 10 240) (1.5*pi)
|
||||
, midWall (rectNSEW 65 40 0 25)
|
||||
, mntLS vShape (V2 50 10) (V3 40 20 50)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user