Move towards removing renderStrategy data
This commit is contained in:
@@ -13,11 +13,14 @@ import Dodge.Room.Data
|
||||
import Dodge.Room.AddTile
|
||||
import Dodge.Default.Wall
|
||||
import Geometry
|
||||
import Geometry.Data
|
||||
import Dodge.Room.Link
|
||||
import qualified IntMapHelp as IM
|
||||
--import Dodge.Debug.LinkDecoration
|
||||
import Picture.Data
|
||||
import Tile
|
||||
import Polyhedra
|
||||
import Polyhedra.Data
|
||||
|
||||
import Control.Monad.State
|
||||
import Control.Lens
|
||||
@@ -32,6 +35,7 @@ import Data.Foldable
|
||||
generateLevelFromRoomList :: State StdGen [Room] -> World -> World
|
||||
generateLevelFromRoomList gr w = updateWallZoning
|
||||
-- . initializeStaticWalls
|
||||
. setupForegroundEdgeVerxs
|
||||
. placeSpots plmnts
|
||||
-- . addRoomPolyDecorations rs
|
||||
-- . addRoomLinkDecorations rs
|
||||
@@ -44,6 +48,12 @@ generateLevelFromRoomList gr w = updateWallZoning
|
||||
zs = map fromIntegral $ randomRs (0,63::Int) $ _randGen w
|
||||
rs' = evalState gr $ _randGen w
|
||||
|
||||
setupForegroundEdgeVerxs :: World -> World
|
||||
setupForegroundEdgeVerxs w = w & foregroundEdgeVerx .~ polyhedrasToEdges (_foregroundDecorations w)
|
||||
|
||||
polyhedrasToEdges :: [Polyhedra] -> [Point3]
|
||||
polyhedrasToEdges = concatMap flat4 . concatMap polyToEdges
|
||||
|
||||
-- | connects a collection (tree) of rooms together
|
||||
generateFromTree :: State StdGen (Tree Room) -> World -> World
|
||||
generateFromTree t w = updateWallZoning $ placeSpots plmnts
|
||||
|
||||
Reference in New Issue
Block a user