Unify RoomPos constructors
This commit is contained in:
@@ -53,8 +53,8 @@ roomRect x y xn yn = defaultRoom
|
||||
{ _rmPolys = [rectNSWE y 0 0 x ]
|
||||
, _rmLinks = lnks
|
||||
, _rmPath = concatMap doublePair pth
|
||||
, _rmPos = map (\pd -> UnusedSpot pd 0 (S.singleton RoomPosOnPath) NotLink) posps
|
||||
++ map (\pd -> UnusedSpot pd 0 (S.singleton RoomPosOffPath) NotLink) interposps
|
||||
, _rmPos = map (roomposat RoomPosOnPath) posps
|
||||
++ map (roomposat RoomPosOffPath) interposps
|
||||
, _rmPmnts = []
|
||||
, _rmBound = [rectNSWE (y+5) (-5) (-5) (x+5)]
|
||||
, _rmFloor = Tiled [Tile
|
||||
@@ -66,6 +66,7 @@ roomRect x y xn yn = defaultRoom
|
||||
, _rmRandPSs = [psRandRanges (10,x-10) (10,y-10) (0,2*pi)]
|
||||
}
|
||||
where
|
||||
roomposat onoffpath p = RoomPos p 0 (S.singleton onoffpath) NotLink 0
|
||||
yd = (y - 40) / fromIntegral yn
|
||||
xd = (x - 40) / fromIntegral xn
|
||||
somelnks poffset ps a = zip (map (+.+ poffset) ps) (repeat a)
|
||||
@@ -147,8 +148,8 @@ quarterRoomTri w = do
|
||||
, sPS (V2 (w-15) (w-25)) pi PutNothing
|
||||
]
|
||||
, _rmPos =
|
||||
[ UnusedSpot (V2 (w-20) (w-20)) pi S.empty NotLink
|
||||
, UnusedSpot (V2 (w-15) (w-25)) pi S.empty NotLink
|
||||
[ RoomPos (V2 (w-20) (w-20)) pi S.empty NotLink 0
|
||||
, RoomPos (V2 (w-15) (w-25)) pi S.empty NotLink 0
|
||||
]
|
||||
, _rmBound = [[V2 0 0,V2 w w,V2 (-w) w]]
|
||||
}
|
||||
@@ -188,8 +189,9 @@ quarterRoomSquare w = do
|
||||
, sPS (V2 20 (2*w-40)) pi PutNothing
|
||||
, sPS (V2 25 (2*w-45)) pi PutNothing
|
||||
]
|
||||
, _rmPos = [UnusedSpot (V2 20 (2*w-40)) pi S.empty NotLink
|
||||
, UnusedSpot (V2 25 (2*w-45)) pi S.empty NotLink
|
||||
, _rmPos =
|
||||
[ RoomPos (V2 20 (2*w-40)) pi S.empty NotLink 0
|
||||
, RoomPos (V2 25 (2*w-45)) pi S.empty NotLink 0
|
||||
]
|
||||
, _rmBound = [map toV2 [(w,w),(0,2*w),(-w,w)]]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user