Unify world shape and picture into spic

This commit is contained in:
2021-11-01 02:00:12 +00:00
parent 86fdfd260e
commit da346bc3a0
9 changed files with 266 additions and 158 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
{- | Creation, update and destruction of destructible walls. -}
module Dodge.LevelGen.Block
( placeBlock
, putLineBlock
, placeLineBlock
)
where
import Dodge.Data
@@ -63,7 +63,7 @@ placeBlock poly i c opac is w = (0, foldr (uncurry removePathsCrossing) wWithBlo
wWithBlock = addBlock poly i c opac is w
{- | Splits a line into many four cornered blocks. -}
putLineBlock
placeLineBlock
:: Wall -- ^ Base pane
-> Float -- ^ Block width
-> Float -- ^ Block depth
@@ -71,7 +71,7 @@ putLineBlock
-> Point2 -- ^ End point (symmetric)
-> World
-> (Int, World)
putLineBlock basePane blockWidth depth a b w = (,) 0
placeLineBlock basePane blockWidth depth a b w = (,) 0
$ removePathsCrossing a b $ foldr insertWall (insertBlocks w) listWalls
where
d = dist a b