Improve some door placement

This commit is contained in:
2025-10-24 20:30:36 +01:00
parent 95b4105f52
commit b0d519c69d
9 changed files with 92 additions and 115 deletions
+2 -16
View File
@@ -22,27 +22,13 @@ data Block = Block
, _blWallIDs :: IS.IntSet
, _blHP :: Int
, _blShadows :: [Int] -- a list of walls that are not shown when this block exists
, _blFootprint :: [Point2] -- TODO check whether this should be clockwise/anticlockwise
, _blFootprint :: [Point2] -- TODO check whether this should be clockwise/anticlockwise
, _blPos :: Point2
, _blDir :: Float
, _blHeight :: Float
-- , _blDraw :: BlockDraw
, _blDraw :: Shape
, _blDraw :: Shape -- should probably make a data type for instances of these...
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
--data BlockDraw
-- = BlockDrawMempty
-- | BlockDrawBlSh Shape
---- | BlockDraws [BlockDraw]
---- | BlockDrawColHeightPoss Color Float [Point2]
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
--
--data BlSh
-- = BlShConst Shape
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Block
--deriveJSON defaultOptions ''BlSh
--deriveJSON defaultOptions ''BlockDraw
deriveJSON defaultOptions ''Block
+1 -1
View File
@@ -54,7 +54,7 @@ data PSType
| PutWall {_pwPoly :: [Point2], _pwWall :: Wall}
| PutSlideDr Bool Door Wall (S.Set EdgeObstacle) Float Point2 Point2
-- | PutDoor Color EdgeObstacle WdBl [(Point2, Point2)]
| PutDoor Bool (S.Set EdgeObstacle) WdBl Float Point2A Point2A -- [(Point2, Point2)]
| PutDoor Bool WdBl Float Point2A Point2A
| RandPS (State StdGen PSType)
| PutForeground ForegroundShape
| PutWorldUpdate (Int -> PlacementSpot -> GenWorld -> GenWorld)