Simplify block drawing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Placement.Instance.Block where
|
||||
|
||||
import Shape.Data
|
||||
import Color
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Block
|
||||
@@ -7,7 +8,7 @@ import Dodge.Default.Wall
|
||||
import Geometry
|
||||
import LensHelp
|
||||
|
||||
decoratedBlock :: BlSh -> Material -> Color -> Float -> [Point2] -> PSType
|
||||
decoratedBlock :: Shape -> Material -> Color -> Float -> [Point2] -> PSType
|
||||
decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
|
||||
where
|
||||
bl =
|
||||
@@ -24,4 +25,4 @@ decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
|
||||
& wlHeight .~ h
|
||||
|
||||
lowBlock :: Material -> Color -> Float -> [Point2] -> PSType
|
||||
lowBlock = decoratedBlock BlShMempty
|
||||
lowBlock = decoratedBlock mempty
|
||||
|
||||
@@ -20,7 +20,7 @@ tankSquareDec ::
|
||||
tankSquareDec dec = tankShape (reverse . orderPolygon $ square 20) (dec 20 20 31)
|
||||
|
||||
tankShape :: [Point2] -> (Color -> Color -> Shape) -> Color -> Color -> Placement
|
||||
tankShape baseshape facade col col' = sps0 $ decoratedBlock (BlShConst $ facade col col') Metal col 31 baseshape
|
||||
tankShape baseshape facade col col' = sps0 $ decoratedBlock (facade col col') Metal col 31 baseshape
|
||||
|
||||
roundTank :: Color -> Color -> Placement
|
||||
roundTank = tankShape (polyCirc 4 20) $
|
||||
|
||||
Reference in New Issue
Block a user