Cleanup warnings
This commit is contained in:
@@ -5,7 +5,7 @@ Creation of doors that open when creatures approach them.
|
||||
module Dodge.LevelGen.AutoDoor
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.Creature.State.Data
|
||||
--import Dodge.Creature.State.Data
|
||||
import Dodge.Base
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Creature.Property
|
||||
@@ -13,11 +13,11 @@ import Geometry
|
||||
import Picture
|
||||
import qualified DoubleStack as DS
|
||||
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
--import Data.List
|
||||
--import Data.Maybe
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Control.Lens
|
||||
import Control.DeepSeq (deepseq)
|
||||
--import Control.DeepSeq (deepseq)
|
||||
|
||||
addAutoDoor
|
||||
:: Point2 -- ^ Left point
|
||||
@@ -41,10 +41,11 @@ mkAutoDoor
|
||||
-> Point2 -- ^ Right point (though the two points should be symmetric)
|
||||
-> [Int] -- ^ Wall ids
|
||||
-> [Wall]
|
||||
mkAutoDoor pl pr xs = addSound $ zipWith3 (autoDoorPane (pl,pr))
|
||||
xs
|
||||
(lDoorClosed ++ rDoorClosed)
|
||||
(map shiftL lDoorClosed ++ map shiftR rDoorClosed)
|
||||
mkAutoDoor pl pr xs = addSound
|
||||
$ zipWith3 (autoDoorPane (pl,pr))
|
||||
xs
|
||||
(lDoorClosed ++ rDoorClosed)
|
||||
(map shiftL lDoorClosed ++ map shiftR rDoorClosed)
|
||||
where
|
||||
lDoorClosed = [ (pld,hwd)
|
||||
, (hwd,hwu)
|
||||
@@ -67,7 +68,8 @@ mkAutoDoor pl pr xs = addSound $ zipWith3 (autoDoorPane (pl,pr))
|
||||
shiftR = h $ (-.- parallel) . (+.+ normalizeV parallel)
|
||||
h func (x,y) = (func x,func y)
|
||||
|
||||
addSound (x:xs) = f x : xs
|
||||
addSound (x:ys) = f x : ys
|
||||
addSound _ = error "Trying to add a sound to malformed auto door"
|
||||
f wl = over doorMech g wl
|
||||
g dm w
|
||||
| dist wp pld > 2 && dist wp hwd > 2
|
||||
|
||||
Reference in New Issue
Block a user