37 lines
629 B
Haskell
37 lines
629 B
Haskell
|
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
|
||
|
}
|