Tweak wall cutting, removes inverse walls
This commit is contained in:
+4
-1
@@ -5,6 +5,7 @@ module Dodge.Layout
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.LevelGen
|
||||
import Dodge.LevelGen.StaticWalls
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Base
|
||||
import Dodge.RandomHelp
|
||||
@@ -77,6 +78,7 @@ wallsFromTree t =
|
||||
-- createInnerWalls
|
||||
divideWalls
|
||||
. assignKeys
|
||||
. removeInverseWalls
|
||||
. foldr cutWalls [] -- map (map (g . roundPoint2))
|
||||
-- . map (map roundPoint2)
|
||||
$ (concatMap _rmPolys $ flatten t)
|
||||
@@ -88,7 +90,8 @@ wallsFromTree t =
|
||||
wallsFromRooms :: [Room] -> IM.IntMap Wall
|
||||
wallsFromRooms =
|
||||
-- divideWalls .
|
||||
IM.fromList . zip [0..] . zipWith f [0..] . foldr cutWalls [] . concatMap _rmPolys
|
||||
IM.fromList . zip [0..] . zipWith f [0..] . removeInverseWalls
|
||||
. foldr cutWalls [] . concatMap _rmPolys
|
||||
where
|
||||
f i (x,y) = defaultWall {_wlLine = [x,y] , _wlID = i}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user