Automatically inherit tile positioning
This commit is contained in:
@@ -37,18 +37,13 @@ doRoomShift rm = shiftRoomBy (_rmShift rm) rm & rmShift .~ _rmShift rm
|
||||
shiftRoomBy :: (Point2, Float) -> Room -> Room
|
||||
shiftRoomBy shift r =
|
||||
r
|
||||
& rmPolys %~ fmap (map (shiftPointBy shift))
|
||||
& rmLinks %~ fmap (shiftLinkBy shift)
|
||||
& rmPolys . each . each %~ shiftPointBy shift
|
||||
& rmLinks . each %~ shiftLinkBy shift
|
||||
& rmPath %~ S.map (shiftPathBy shift)
|
||||
& rmBound %~ fmap (map (shiftPointBy shift))
|
||||
& rmBound . each . each %~ shiftPointBy shift
|
||||
& rmShift %~ shiftPosDirBy shift
|
||||
& rmFloor . tiles . each %~ shiftTile shift
|
||||
-- %~ map
|
||||
-- ( (tilePoly %~ map (shiftPointBy shift))
|
||||
-- . (tileZero %~ shiftPointBy shift)
|
||||
-- . (tileTangentPos %~ shiftPointBy shift)
|
||||
-- )
|
||||
& rmViewpoints %~ map (shiftPointBy shift)
|
||||
& rmViewpoints . each %~ shiftPointBy shift
|
||||
|
||||
shiftTile :: Point2A -> Tile -> Tile
|
||||
shiftTile shift tl = case tl ^. tileZeroShift of
|
||||
|
||||
Reference in New Issue
Block a user