Cleanup
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
module Dodge.Placement.Instance.Wall
|
||||
(invisibleWall, crystalLine, blockLine, putBlockRect
|
||||
,baseBlockPane
|
||||
,midWall
|
||||
,windowLine
|
||||
,putBlockN
|
||||
,putBlockV
|
||||
,heightWallPS
|
||||
,replacePutID
|
||||
) where
|
||||
module Dodge.Placement.Instance.Wall (
|
||||
invisibleWall,
|
||||
crystalLine,
|
||||
blockLine,
|
||||
putBlockRect,
|
||||
baseBlockPane,
|
||||
midWall,
|
||||
windowLine,
|
||||
putBlockN,
|
||||
putBlockV,
|
||||
heightWallPS,
|
||||
replacePutID,
|
||||
) where
|
||||
|
||||
import qualified Data.Set as S
|
||||
import Dodge.Material.Color
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.LevelGen.PlacementHelper
|
||||
import Dodge.Material.Color
|
||||
import Dodge.Placement.Instance.Block
|
||||
import Geometry
|
||||
|
||||
@@ -95,6 +97,7 @@ crystalLine a b = sps0 $ PutLineBlock defaultCrystalWall 7 a b
|
||||
|
||||
baseBlockPane :: Wall
|
||||
baseBlockPane = defaultWall & wlOpacity .~ Opaque 17
|
||||
|
||||
-- & wlPathFlag .~ S.fromList [WallBlockVisibility, WallNotAutoOpen]
|
||||
|
||||
-- TODO find home for this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--{-# LANGUAGE LambdaCase #-}
|
||||
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
|
||||
--{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
|
||||
|
||||
{- | deals with placement of objects within the world
|
||||
after they have had their coordinates set by the layout
|
||||
@@ -174,13 +174,10 @@ placeChasm gw rid ps shiftps =
|
||||
-- where
|
||||
-- (evaluatedType, g) = runState rgen (_randGen $ _gwWorld w)
|
||||
|
||||
-- this function is the reason for the warning suppression
|
||||
-- remove the warning suppression if it changes
|
||||
placeWallPoly :: [Point2] -> Wall -> World -> World
|
||||
placeWallPoly qs wl w = foldl' (addPane wl) w pairs
|
||||
where
|
||||
(p : ps) = orderPolygon qs
|
||||
pairs = zip (ps ++ [p]) (p : ps)
|
||||
placeWallPoly qs wl w
|
||||
| (p : ps) <- orderPolygon qs = foldl' (addPane wl) w $ zip (ps ++ [p]) (p : ps)
|
||||
| otherwise = error "tried to place wall poly with too few points"
|
||||
|
||||
addPane :: Wall -> World -> (Point2, Point2) -> World
|
||||
addPane wl w l =
|
||||
|
||||
Reference in New Issue
Block a user