Commit before making all walls zoned
This commit is contained in:
@@ -4,7 +4,7 @@ import Dodge.Save
|
||||
import Dodge.Data
|
||||
import Dodge.Data.SoundOrigin
|
||||
import Dodge.Creature
|
||||
import Dodge.Zone
|
||||
--import Dodge.Zone
|
||||
import Dodge.Floor
|
||||
import Dodge.Layout
|
||||
import Dodge.Story
|
||||
@@ -24,8 +24,8 @@ import qualified Data.Set as S
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.Map as M
|
||||
import Data.Maybe
|
||||
import Control.Lens
|
||||
import Data.List (partition)
|
||||
--import Control.Lens
|
||||
--import Data.List (partition)
|
||||
--import Data.List (sortOn)
|
||||
|
||||
firstWorld :: IO World
|
||||
@@ -60,17 +60,8 @@ initialWorld = defaultWorld
|
||||
, _menuLayers = [TerminalScreen 300 rezText']
|
||||
, _worldState = M.empty
|
||||
}
|
||||
-- TODO delete this duplicate
|
||||
wallsAndWindows
|
||||
:: World
|
||||
-> ( [((Point2,Point2),Point4)] ,[((Point2,Point2),Point4)] )
|
||||
wallsAndWindows w
|
||||
= (map f wls, map f $ filter (fromMaybe True . (^? blVisible)) wins)
|
||||
where
|
||||
f wl = (_wlLine wl, _wlColor wl)
|
||||
(wins,wls) = partition _wlIsSeeThrough . IM.elems $ wallsDoubleScreen w
|
||||
testStringInit :: World -> [String]
|
||||
testStringInit _ = []
|
||||
--testStringInit _ = []
|
||||
--testStringInit w =
|
||||
-- [show $ _worldMinX w
|
||||
-- ,show $ _worldMaxX w
|
||||
@@ -84,10 +75,10 @@ testStringInit _ = []
|
||||
--testStringInit = map show . filter ((== col) . snd) . fst . wallsAndWindows
|
||||
-- where
|
||||
-- col = dim $ dim $ bright red
|
||||
--testStringInit = mapMaybe f . IM.elems . flattenIMIMIM . _wallsZone
|
||||
-- where
|
||||
-- f (dr@Door{}) = Just . show $ _wlLine dr
|
||||
-- f _ = Nothing
|
||||
testStringInit = mapMaybe f . IM.elems . _walls
|
||||
where
|
||||
f dr | _wlColor dr == V4 0 1 0 1 = Just . show $ _wlLine dr
|
||||
| otherwise = Nothing
|
||||
--testStringInit _ = []
|
||||
--testStringInit w = [show . length $ newSounds w]
|
||||
--testStringInit w = (show . _crPos $ _creatures w IM.! 0)
|
||||
|
||||
Reference in New Issue
Block a user