Use grid when creating block debris

This commit is contained in:
2022-07-13 10:44:18 +01:00
parent 1ccb87ff13
commit 6c50021f04
12 changed files with 139 additions and 65 deletions
-1
View File
@@ -13,7 +13,6 @@ decoratedBlock decf mat col h ps = PutBlock bl wl $ reverse ps
where
bl = defaultBlock
& blDraw .~ (\bl' -> noPic (colorSH col (upperPrismPoly h $ reverse ps) <> decf bl'))
& blDeath .~ const id
& blHeight .~ h
& blMaterial .~ mat
wl = defaultWall
+1 -3
View File
@@ -6,8 +6,6 @@ module Dodge.Placement.PlaceSpot.Block
where
import Dodge.Data
import Dodge.Path
import Dodge.Block.Debris
--import Dodge.LevelGen.LevelStructure
import Dodge.Base
--import Dodge.Zone
import Geometry
@@ -76,7 +74,7 @@ plLineBlock basePane blwidth a b gw = ( 0
, _blObstructs = []
, _blMaterial = _wlMaterial basePane
, _blHeight = 100
, _blPos = p, _blDraw = const mempty , _blDeath = makeBlockDebris}
, _blPos = p, _blDraw = const mempty }
)
insertBlocks = flip (foldr insertBlock) $ zip is blockCenPs
ksAtI i = map ( + (wlid + i*4) ) [0,1,2,3]