Move towards unifying RoomPos constructors

This commit is contained in:
2022-03-10 16:21:44 +00:00
parent 907cca0ef0
commit 7b1ac2b682
7 changed files with 94 additions and 60 deletions
+6 -6
View File
@@ -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) posps
++ map (\pd -> UnusedSpot pd 0 $ S.singleton RoomPosOffPath) interposps
, _rmPos = map (\pd -> UnusedSpot pd 0 (S.singleton RoomPosOnPath) NotLink) posps
++ map (\pd -> UnusedSpot pd 0 (S.singleton RoomPosOffPath) NotLink) interposps
, _rmPmnts = []
, _rmBound = [rectNSWE (y+5) (-5) (-5) (x+5)]
, _rmFloor = Tiled [Tile
@@ -147,8 +147,8 @@ quarterRoomTri w = do
, sPS (V2 (w-15) (w-25)) pi PutNothing
]
, _rmPos =
[ UnusedSpot (V2 (w-20) (w-20)) pi S.empty
, UnusedSpot (V2 (w-15) (w-25)) pi S.empty
[ UnusedSpot (V2 (w-20) (w-20)) pi S.empty NotLink
, UnusedSpot (V2 (w-15) (w-25)) pi S.empty NotLink
]
, _rmBound = [[V2 0 0,V2 w w,V2 (-w) w]]
}
@@ -188,8 +188,8 @@ 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
, UnusedSpot (V2 25 (2*w-45)) pi S.empty
, _rmPos = [UnusedSpot (V2 20 (2*w-40)) pi S.empty NotLink
, UnusedSpot (V2 25 (2*w-45)) pi S.empty NotLink
]
, _rmBound = [map toV2 [(w,w),(0,2*w),(-w,w)]]
}