Simplify block drawing further, store shape of block
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module Dodge.Placement.Instance.Block where
|
||||
|
||||
import Shape.Data
|
||||
import Shape
|
||||
import Color
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.Default.Block
|
||||
@@ -13,12 +13,11 @@ decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
|
||||
where
|
||||
bl =
|
||||
defaultBlock
|
||||
& blDraw .~ BlockDraws [BlockDrawColHeightPoss col h ps, BlockDrawBlSh decf]
|
||||
& blDraw .~ (decf <> colorSH col (upperBox Medium Typical h ps))
|
||||
-- BlockDraws [BlockDrawColHeightPoss col h ps, BlockDrawBlSh decf]
|
||||
& blHeight .~ h
|
||||
wl =
|
||||
defaultWall
|
||||
-- & wlPathFlag . at WallNotDestrucable .~ Nothing
|
||||
-- & wlPathFlag . at WallBlockVisibility .~ Nothing
|
||||
& wlRotateTo .~ False
|
||||
& wlOpacity .~ SeeAbove
|
||||
& wlMaterial .~ mat
|
||||
|
||||
@@ -79,7 +79,7 @@ plLineBlock basePane blwidth a b gw =
|
||||
, _blFootprint = cornersAt p -- TODO check winding (clockwise, anticlockwise)
|
||||
, _blHeight = 100
|
||||
, _blPos = p
|
||||
, _blDraw = BlockDrawMempty
|
||||
, _blDraw = mempty
|
||||
}
|
||||
)
|
||||
insertBlocks = flip (foldr insertBlock) $ zip is blockCenPs
|
||||
|
||||
Reference in New Issue
Block a user