Fix inherited tile positioning

This commit is contained in:
2026-04-01 18:01:11 +01:00
parent c504d3c511
commit e50fdb8807
6 changed files with 62 additions and 42 deletions
+16 -6
View File
@@ -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