prepare map construction

This commit is contained in:
nek0 2020-10-12 06:29:09 +02:00
parent ff77587042
commit 02ed49a17b

View file

@ -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