Initial pass at shadows from level geometry

This commit is contained in:
2021-06-29 15:27:26 +02:00
parent 089dcc3f5d
commit 3d16c33d33
20 changed files with 181 additions and 74 deletions
+7 -9
View File
@@ -7,7 +7,7 @@ import Dodge.Room.Procedural
import Dodge.Room.Foreground
import Dodge.Layout.Tree.Polymorphic
import Dodge.LevelGen.Data
import Picture
--import Picture
--import Geometry
import Data.Tree
@@ -22,12 +22,10 @@ startRoom :: RandomGen g => State g (Tree (Either Room Room))
startRoom = do
w <- state $ randomR (100,400)
h <- state $ randomR (200,400)
let fground = sPS (0,0) 0 $ PutForeground $ pictures
[ highPipe (0,h/3) (w, h/3)
, girderV cola 10 (0,3*h/4) (w, 3*h/4)
, girder colb 5 (0,5*h/8) (w, 5*h/8)
]
let fground = sPS (0,0) 0 $ PutForeground $ highPipe (0,h/3) (w, h/3)
-- , girderV cola 10 (0,3*h/4) (w, 3*h/4)
-- , girder colb 5 (0,5*h/8) (w, 5*h/8)
treeFromPost [Left rezBox, Left door] . Right <$> randomiseOutLinks (shiftRoomBy ((-20,-20),0) $ roomRectAutoLinks w h & rmPS %~ (fground :))
where
cola = dark . dark . light . light $ light red
colb = dark . dark . light . light $ light blue
-- where
-- cola = dark . dark . light . light $ light red
-- colb = dark . dark . light . light $ light blue