Refactoring, add screen when generating level
This commit is contained in:
@@ -17,6 +17,7 @@ data PSType = PutCrit Creature
|
||||
| PutAutoDoor Point2 Point2
|
||||
| PutBlock [Int] Color [Point2]
|
||||
| PutLineBlock Wall Float Float Point2 Point2
|
||||
| PutWall { _pwPoly :: [Point2] , _pwWall :: Wall }
|
||||
| PutDoubleDoor Color (World -> Bool) Point2 Point2
|
||||
| PutDoor Color (World -> Bool) [(Point2,Point2)]
|
||||
| PutBtDoor Color Point2 Float Point2 Point2
|
||||
@@ -30,7 +31,6 @@ data PSType = PutCrit Creature
|
||||
, _collectiveFunction :: [Int] -> State StdGen [PSType]
|
||||
}
|
||||
| LabelPS { _psLabel :: Int, _ps :: PSType}
|
||||
| PutWindow { _pwPoly :: [Point2] , _pwColor :: Color }
|
||||
data PlacementSpot = PS
|
||||
{ _psPos :: Point2
|
||||
, _psRot :: Float
|
||||
|
||||
@@ -17,7 +17,14 @@ import qualified Data.IntMap as IM
|
||||
evenOddSplit = foldr f ([],[])
|
||||
where f a (ls,rs) = (rs, a : ls)
|
||||
|
||||
putLineBlock :: Wall -> Float -> Float -> Point2 -> Point2 -> World -> World
|
||||
putLineBlock
|
||||
:: Wall -- Base pane
|
||||
-> Float -- Block width
|
||||
-> Float -- Block depth
|
||||
-> Point2 -- Start point (symmetric)
|
||||
-> Point2 -- End point (symmetric)
|
||||
-> World
|
||||
-> World
|
||||
putLineBlock basePane blockWidth depth a b w = removePathsCrossing a b $ foldr insertBlock w listBlocks
|
||||
where
|
||||
d = dist a b
|
||||
|
||||
Reference in New Issue
Block a user