prepare map construction
This commit is contained in:
parent
ff77587042
commit
02ed49a17b
1 changed files with 15 additions and 1 deletions
16
src/Map.hs
16
src/Map.hs
|
@ -21,7 +21,21 @@ testLevelDesc = LevelDescriptor
|
|||
(3, 3)
|
||||
|
||||
-- constructMap :: LevelDescriptor -> IO LevelMap
|
||||
-- cosntructMap desc = do
|
||||
-- constructMap desc = do
|
||||
-- (layers, dimensions) <- foldM
|
||||
-- (\(layers, dims) descTup -> do
|
||||
-- (nlayer, ndims) <- readLayer descTup
|
||||
-- if not (null layers) && ndims /= dims
|
||||
-- then error ("Map Layer dimensions mismatch in: " <> snd descTup)
|
||||
-- else return (dims ++ [nlayer], ndims)
|
||||
-- )
|
||||
-- ([], (0, 0))
|
||||
-- (maplayers desc)
|
||||
-- LevelMap
|
||||
-- <$> pure layers
|
||||
-- <*> pure (levelWalkLayer desc)
|
||||
-- <*> pure dimensions
|
||||
-- <*> -- TODO: TileMap
|
||||
|
||||
readLayer
|
||||
:: (Word, FilePath) -- | index and path of the layer descriptor image
|
||||
|
|
Loading…
Reference in a new issue