21 lines
498 B
Haskell
21 lines
498 B
Haskell
{-# LANGUAGE TemplateHaskell #-}
|
|
--{-# LANGUAGE StrictData #-}
|
|
module Data.Tile where
|
|
import Geometry.Data
|
|
|
|
import Control.Lens
|
|
|
|
data Floor
|
|
= InheritFloor
|
|
-- | TileWith Float
|
|
| Tiled { _tiles :: [Tile]}
|
|
data Tile = Tile
|
|
{ _tilePoly :: [Point2]
|
|
, _tileZero :: Point2 -- ^ point in the world where tile texture is 0,0
|
|
, _tileX :: Point2 -- ^ vector in the X direction (1,0)
|
|
, _tileZ :: Float
|
|
}
|
|
deriving (Eq, Ord, Show)
|
|
makeLenses ''Floor
|
|
makeLenses ''Tile
|