Non-convex chasms

This commit is contained in:
2026-01-26 10:59:51 +00:00
parent 962df63e62
commit a6976eae8d
11 changed files with 341 additions and 323 deletions
+1
View File
@@ -31,6 +31,7 @@ data CWorld = CWorld
, _incEdges :: [(Int,Int)]
, _numberFloorVerxs :: Int
, _chasms :: [[Point2]]
, _cliffs :: [(Point2,Point2)]
, _numberChasmVerxs :: Int
, _highlightItems :: IM.IntMap Int
}
+8 -1
View File
@@ -58,11 +58,18 @@ data PSType
| PutWorldUpdate (Int -> PlacementSpot -> GenWorld -> GenWorld) -- the Int is the roomid
| PutNothing
| PutID {_putID :: Int}
| PutChasm {_putChasmPoly :: [Point2]}
| PutChasm {_putChasmChasms :: [[Point2]], _putChasmCliffs :: [[Point2]]}
-- the chasms should be a convex partition of the cliffs.
-- Chasm and cliff polygons are orientated anticlockwise, so platforms
-- within a chasm will appear as a clockwise oriented list of points
-- in _putChasmCliffs.
| PutLabel {_putLabel :: String} -- currently not actually put anywhere
-- just used for later inspection as top level
-- of a continuing placement in a room placement list
putConvexChasm :: [Point2] -> PSType
putConvexChasm ps = PutChasm [ps] [ps]
instance ShortShow PSType where
shortShow PutCrit {} = "PutCrit"
shortShow PutMachine {} = "PutMachine"