From e4c51bc47a5c34dc26b3d41a0869d23edf413743 Mon Sep 17 00:00:00 2001 From: jgk Date: Thu, 4 Mar 2021 19:41:59 +0100 Subject: [PATCH] Implement inner walls for static walls, other walls broken --- src/Dodge/Layout.hs | 4 ++-- src/Dodge/Rendering.hs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Dodge/Layout.hs b/src/Dodge/Layout.hs index 85ec08900..0a52e3be9 100644 --- a/src/Dodge/Layout.hs +++ b/src/Dodge/Layout.hs @@ -65,8 +65,8 @@ makePath :: Tree Room -> [(Point2,Point2)] makePath = concat . map _rmPath . flatten wallsFromTree :: Tree Room -> IM.IntMap Wall ---wallsFromTree t = createInnerWalls $ divideWalls $ foldr cutWalls IM.empty (concatMap _rmPolys $ flatten t) -wallsFromTree t = checkWalls $ nubWalls $ divideWalls $ foldr cutWalls IM.empty (concatMap _rmPolys $ flatten t) +wallsFromTree t = createInnerWalls $ nubWalls $ divideWalls $ foldr cutWalls IM.empty (concatMap _rmPolys $ flatten t) +--wallsFromTree t = checkWalls $ nubWalls $ divideWalls $ foldr cutWalls IM.empty (concatMap _rmPolys $ flatten t) --wallsFromTree t = divideWalls $ foldr cutWalls IM.empty (concatMap _rmPolys $ flatten t) divideWall :: Wall -> [Wall] diff --git a/src/Dodge/Rendering.hs b/src/Dodge/Rendering.hs index 72efa7412..62c0bff15 100644 --- a/src/Dodge/Rendering.hs +++ b/src/Dodge/Rendering.hs @@ -319,7 +319,8 @@ drawSmokeShadow w sm@(Smoke {_smPos = p, _smRad = r', _smColor = c, _smPs = ps, drawWall :: Wall -> Drawing drawWall wl = case _wlDraw wl of - Nothing -> onLayerL [levLayer WlLayer, layer2] $ color c $ polygon [x,x +.+ n2,y +.+ n2, y] + Nothing -> onLayerL [levLayer WlLayer, layer2] $ color c $ polygon $ _wlLine wl + --Nothing -> onLayerL [levLayer WlLayer, layer2] $ color c $ polygon [x,x +.+ n2,y +.+ n2, y] Just d -> d wl where (x:y:_) = _wlLine wl