Cleanup
This commit is contained in:
@@ -47,8 +47,7 @@ roomRect
|
||||
-> Room
|
||||
roomRect x y xn yn = defaultRoom
|
||||
{ _rmPolys = [rectNSWE y 0 0 x ]
|
||||
, _rmOutLinks = init lnks
|
||||
, _rmInLinks = [last lnks]
|
||||
, _rmLinks = init lnks ++ [last lnks]
|
||||
, _rmPath = concatMap doublePair pth
|
||||
, _rmPmnts = []
|
||||
, _rmBound = [rectNSWE (y+5) (-5) (-5) (x+5)]
|
||||
@@ -85,8 +84,7 @@ Mostly involves concatenation. -}
|
||||
combineRooms :: Room -> Room -> Room
|
||||
combineRooms r r' = defaultRoom
|
||||
{ _rmPolys = _rmPolys r ++ _rmPolys r'
|
||||
, _rmOutLinks = _rmOutLinks r ++ _rmOutLinks r'
|
||||
, _rmInLinks = _rmInLinks r ++ _rmInLinks r'
|
||||
, _rmLinks = _rmLinks r ++ _rmLinks r'
|
||||
, _rmPath = map clampPath $ _rmPath r
|
||||
++ _rmPath r'
|
||||
, _rmPmnts = map (shiftPlacement $ _rmShift r) (_rmPmnts r)
|
||||
@@ -123,8 +121,7 @@ quarterRoomFlat w = do
|
||||
]
|
||||
pure $ defaultRoom
|
||||
{ _rmPolys = [ [V2 0 0,V2 w w,V2 (-w) w] ]
|
||||
, _rmOutLinks = [toBothLnk (V2 0 w, 0)]
|
||||
, _rmInLinks = [toBothLnk (V2 0 w, 0)]
|
||||
, _rmLinks = [toBothLnk (V2 0 w, 0)]
|
||||
, _rmPath = concatMap doublePair
|
||||
[(V2 0 w,V2 0 (w-20))
|
||||
,(V2 0 (w-20),V2 (w-20) (w-20))
|
||||
@@ -158,11 +155,7 @@ fourthCornerWall w = do
|
||||
]
|
||||
pure $ defaultRoom
|
||||
{ _rmPolys = [ map toV2 [(0,0),(w,w),(0,2*w),(-w,w)] ]
|
||||
, _rmOutLinks =
|
||||
[toBothLnk (V2 (w/2) (3*w/2), negate $ pi/4)
|
||||
,toBothLnk (V2 (negate $ w/2) (3*w/2), pi/4)
|
||||
]
|
||||
, _rmInLinks =
|
||||
, _rmLinks =
|
||||
[toBothLnk (V2 (w/2) (3*w/2), negate $ pi/4)
|
||||
,toBothLnk (V2 (negate $ w/2) (3*w/2), pi/4)
|
||||
]
|
||||
@@ -225,11 +218,11 @@ centerVaultRoom
|
||||
centerVaultRoom w h d = do
|
||||
return $ defaultRoom
|
||||
{ _rmPolys = [rectNSWE h (-h) (-w) w]
|
||||
, _rmOutLinks =
|
||||
, _rmLinks =
|
||||
[outLink (V2 0 h) 0
|
||||
,outLink (V2 w 0) (-pi/2)
|
||||
,outLink (V2 (-w) 0) (pi/2) ]
|
||||
, _rmInLinks = [inLink (V2 0 (-h)) pi ]
|
||||
,outLink (V2 (-w) 0) (pi/2)
|
||||
, inLink (V2 0 (-h)) pi ]
|
||||
, _rmPath = []
|
||||
, _rmPmnts =
|
||||
[sps0 $ PutWall (rectNSEW d (d - 30) d (d - 30)) defaultWall
|
||||
|
||||
Reference in New Issue
Block a user