Cleanup warnings
This commit is contained in:
@@ -12,16 +12,17 @@ import Dodge.Room.Data
|
||||
import Dodge.Room.Placement
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Item.Consumable
|
||||
import Dodge.Item.Equipment
|
||||
import Dodge.Item.Weapon
|
||||
import Dodge.RandomHelp
|
||||
import Dodge.LevelGen
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Creature
|
||||
import Dodge.Default
|
||||
--import Dodge.Default
|
||||
import Geometry
|
||||
import Picture
|
||||
|
||||
import Data.List (nub,nubBy,sortBy,minimumBy)
|
||||
import Data.List
|
||||
import Data.Function (on)
|
||||
import qualified Data.Tuple.Extra as Tup
|
||||
import qualified Data.Map as M
|
||||
@@ -94,19 +95,19 @@ combineRooms r r' = Room
|
||||
, _rmPS = _rmPS r ++ _rmPS r'
|
||||
, _rmBound = _rmBound r ++ _rmBound r'
|
||||
}
|
||||
{- The top fourth of a room of a given height. -}
|
||||
fourth
|
||||
:: Float -- ^ Distance from center of room to top edge
|
||||
-> Room
|
||||
fourth w = Room
|
||||
{ _rmPolys = [ [(0,0),(w,w),(-w,w)] ]
|
||||
, _rmLinks = [((0,w), 0)]
|
||||
, _rmPath = [((0,w),(0,0)),((0,0),(0,w))]
|
||||
, _rmPS =
|
||||
[sPS (0,w/2) 0 putLamp
|
||||
]
|
||||
, _rmBound = [[(0,0),(w,w),(-w,w)]]
|
||||
}
|
||||
--{- The top fourth of a room of a given height. -}
|
||||
--fourth
|
||||
-- :: Float -- ^ Distance from center of room to top edge
|
||||
-- -> Room
|
||||
--fourth w = Room
|
||||
-- { _rmPolys = [ [(0,0),(w,w),(-w,w)] ]
|
||||
-- , _rmLinks = [((0,w), 0)]
|
||||
-- , _rmPath = [((0,w),(0,0)),((0,0),(0,w))]
|
||||
-- , _rmPS =
|
||||
-- [sPS (0,w/2) 0 putLamp
|
||||
-- ]
|
||||
-- , _rmBound = [[(0,0),(w,w),(-w,w)]]
|
||||
-- }
|
||||
{- Randomly generate a top fourth of a room possibly with a wall.
|
||||
Add a light and a 'PutNothing' placement. -}
|
||||
fourthWall :: RandomGen g => Float -> State g Room
|
||||
@@ -136,18 +137,17 @@ fourthWall w = do
|
||||
, _rmPS = b
|
||||
, _rmBound = [[(0,0),(w,w),(-w,w)]]
|
||||
}
|
||||
|
||||
fourthCorner :: Float -> Room
|
||||
fourthCorner w = Room
|
||||
{ _rmPolys = [ [(0,0),(w,w),(0,2*w),(-w,w)] ]
|
||||
, _rmLinks =
|
||||
[((w/2,3*w/2), negate $ pi/4)
|
||||
,((negate $ w/2,3*w/2), pi/4)
|
||||
]
|
||||
, _rmPath = [((0,w),(0,0)),((0,0),(0,w))]
|
||||
, _rmPS = [sPS (0,w) 0 putLamp]
|
||||
, _rmBound = [[(w,w),(0,2*w),(-w,w)]]
|
||||
}
|
||||
--fourthCorner :: Float -> Room
|
||||
--fourthCorner w = Room
|
||||
-- { _rmPolys = [ [(0,0),(w,w),(0,2*w),(-w,w)] ]
|
||||
-- , _rmLinks =
|
||||
-- [((w/2,3*w/2), negate $ pi/4)
|
||||
-- ,((negate $ w/2,3*w/2), pi/4)
|
||||
-- ]
|
||||
-- , _rmPath = [((0,w),(0,0)),((0,0),(0,w))]
|
||||
-- , _rmPS = [sPS (0,w) 0 putLamp]
|
||||
-- , _rmBound = [[(w,w),(0,2*w),(-w,w)]]
|
||||
-- }
|
||||
|
||||
fourthCornerWall :: RandomGen g => Float -> State g Room
|
||||
fourthCornerWall w = do
|
||||
@@ -261,5 +261,5 @@ centerVaultRoom n w h d = do
|
||||
(over worldState (M.insert (DoorNumOpen i) True))
|
||||
(over worldState (M.insert (DoorNumOpen i) False))
|
||||
]
|
||||
cond i w = or $ M.lookup (DoorNumOpen i) (_worldState w)
|
||||
cond i w' = or $ M.lookup (DoorNumOpen i) (_worldState w')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user