Some cleanup, sidetracked from inter-room placements

This commit is contained in:
2021-11-12 14:16:16 +00:00
parent 1d5b2ea765
commit 67e164c830
13 changed files with 160 additions and 116 deletions
+2 -4
View File
@@ -10,8 +10,6 @@ import Dodge.Wall.Zone
import Dodge.Zone
import Dodge.GameRoom
import Dodge.Bounds
--import Dodge.RandomHelp
--import Dodge.Graph
import Dodge.Layout.Tree.Polymorphic (applyToRoot)
import Dodge.Room.Data
import Dodge.Room.AddTile
@@ -117,10 +115,10 @@ gameRoomsFromRooms = map f
f rm = GameRoom
{ _grViewpoints = _rmViewpoints rm ++ (map fst . foldl' (flip cutWalls) [] $ _rmPolys rm)
++ map fst (_rmLinks rm)
, _grViewpointsEx = mapMaybe unpos (_rmUsedLinks rm)
, _grViewpointsEx = mapMaybe unpos (_rmPos rm)
, _grBound = expandPolyByFixed 100 . convexHullSafe . nubBy closePoints
. concat $ _rmBound rm ++ _rmPolys rm
, _grDir = getDir $ _rmUsedLinks rm
, _grDir = getDir $ _rmPos rm
, _grName = _rmName rm
}
closePoints x y = roundPoint2 x == roundPoint2 y