Fix inherited tile positioning
This commit is contained in:
+16
-6
@@ -42,14 +42,24 @@ shiftRoomBy shift r =
|
||||
& rmPath %~ S.map (shiftPathBy shift)
|
||||
& rmBound %~ fmap (map (shiftPointBy shift))
|
||||
& rmShift %~ shiftPosDirBy shift
|
||||
& rmFloor . tiles
|
||||
%~ map
|
||||
( (tilePoly %~ map (shiftPointBy shift))
|
||||
. (tileZero %~ shiftPointBy shift)
|
||||
. (tileTangentPos %~ shiftPointBy shift)
|
||||
)
|
||||
& rmFloor . tiles . each %~ shiftTile shift
|
||||
-- %~ map
|
||||
-- ( (tilePoly %~ map (shiftPointBy shift))
|
||||
-- . (tileZero %~ shiftPointBy shift)
|
||||
-- . (tileTangentPos %~ shiftPointBy shift)
|
||||
-- )
|
||||
& rmViewpoints %~ map (shiftPointBy shift)
|
||||
|
||||
shiftTile :: Point2A -> Tile -> Tile
|
||||
shiftTile shift tl = case tl ^. tileZeroShift of
|
||||
Nothing -> tl & tilePoly . each %~ shiftPointBy shift
|
||||
& tileZero %~ shiftPointBy shift
|
||||
& tileTangentPos %~ shiftPointBy shift
|
||||
Just s -> tl & tilePoly . each %~ shiftPointBy shift
|
||||
& tileZero %~ shiftPointBy s
|
||||
& tileTangentPos %~ shiftPointBy s
|
||||
|
||||
|
||||
moveRoomBy :: (Point2, Float) -> Room -> Room
|
||||
moveRoomBy shift r =
|
||||
r
|
||||
|
||||
Reference in New Issue
Block a user