pituicat/src/Types/GameMap.hs

37 lines
629 B
Haskell
Raw Normal View History

2020-10-06 02:19:07 +00:00
module Types.LevelMap where
import Data.Vector
import Linear
data LevelMap = LevelMap
{ mapLayers :: Vector MapLayer
, mapWalkLayer :: Word
, mapDimensions :: V2 Word
, mapTileMap :: TileMap
}
deriving (Eq, Show)
newtype MapLayer = MapLayer
{ layerTiles :: Vector Tile
}
deriving (Eq, Show)
data Tile = Tile
{ tileOffset :: V2 Float
, tileType :: TileType
}
deriving (Eq, Show)
data TileType
= Wall
| Platform
| Decoration
deriving (Enum, Ord, Eq, Show)
data TileMap = TileMap
{ tileMapDimensions :: V2 Word
, tileMapPath :: FilePath
, tileMapIndex :: Word
}