parseMapInfo :: Get MapType
parseMapInfo = do
  e <- isEmpty
  if e
     then return $
        MapType undefined
                undefined
                undefined
                undefined
      else do
        pl1 <- getWord32le
        pl2 <- getWord32le
        pl3 <- getWord32le

        plLen1 <- getWord16le -- TODO: combine into one tuple with planes?
        plLen2 <- getWord16le
        plLen3 <- getWord16le

        w <- getWord16le
        h <- getWord16le

        name <- replicateM 16 getWord8

        return $
          MapType (fromIntegral pl1,    fromIntegral pl2,    fromIntegral pl3)
                  (fromIntegral plLen1, fromIntegral plLen2, fromIntegral plLen3)
                  (fromIntegral w, fromIntegral h)
                  (bytesToString name)


-- |
--
parseMapInfo :: Get MapType
parseMapInfo = do
  e <- isEmpty
  if e
     then return $
        MapType undefined
                undefined
                undefined
                undefined
      else do
        pl1 <- getWord32le
        pl2 <- getWord32le
        pl3 <- getWord32le

        plLen1 <- getWord16le -- TODO: combine into one tuple with planes?
        plLen2 <- getWord16le
        plLen3 <- getWord16le

        w <- getWord16le
        h <- getWord16le

        name <- replicateM 16 getWord8

        return $
          MapType (fromIntegral pl1,    fromIntegral pl2,    fromIntegral pl3)
                  (fromIntegral plLen1, fromIntegral plLen2, fromIntegral plLen3)
                  (fromIntegral w, fromIntegral h)
                  (bytesToString name)


-- |
--
parseMapInfo = do
  e <- isEmpty
  if e
     then return $
        MapType undefined
                undefined
                undefined
                undefined
      else do
        pl1 <- getWord32le
        pl2 <- getWord32le
        pl3 <- getWord32le

        plLen1 <- getWord16le -- TODO: combine into one tuple with planes?
        plLen2 <- getWord16le
        plLen3 <- getWord16le

        w <- getWord16le
        h <- getWord16le

        name <- replicateM 16 getWord8

        return $
          MapType (fromIntegral pl1,    fromIntegral pl2,    fromIntegral pl3)
                  (fromIntegral plLen1, fromIntegral plLen2, fromIntegral plLen3)
                  (fromIntegral w, fromIntegral h)
                  (bytesToString name)


-- |
--