Reify block drawing

This commit is contained in:
2022-07-25 01:27:39 +01:00
parent 486c203fa2
commit c3a5b9d5be
15 changed files with 85 additions and 23 deletions
+12 -2
View File
@@ -1,9 +1,10 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.Block where
import Shape.Data
import Color
import Dodge.Data.Material
import Dodge.Data.PathGraph
import ShapePicture
import Geometry
import Control.Lens
import qualified Data.IntSet as IS
@@ -17,7 +18,16 @@ data Block = Block
, _blDir :: Float
, _blHeight :: Float
, _blMaterial :: Material
, _blDraw :: Block -> SPic
, _blDraw :: BlockDraw --Block -> SPic
, _blObstructs :: [(Int,Int,PathEdge)]
}
deriving (Eq,Ord,Show,Read)
data BlockDraw = BlockDrawMempty
| BlockDrawBlSh BlSh
| BlockDraws [BlockDraw]
| BlockDrawColHeightPoss Color Float [Point2]
deriving (Eq,Ord,Show,Read)
data BlSh = BlShMempty
| BlShConst Shape
deriving (Eq,Ord,Show,Read)
makeLenses ''Block