Various refactoring
This commit is contained in:
+15
-14
@@ -21,22 +21,23 @@ import Control.Lens
|
||||
import Data.Maybe
|
||||
import Data.List (partition)
|
||||
import qualified Data.IntMap.Lazy as IM
|
||||
--import qualified Data.Vector.Fusion.Stream.Monadic as VS
|
||||
|
||||
worldPictures :: World -> Picture
|
||||
worldPictures w = concat $
|
||||
IM.elems (_decorations w) ++
|
||||
(map (dbArg _pjDraw) . IM.elems $ _projectiles w) ++
|
||||
(map (crDraw w) . IM.elems $ _creatures w) ++
|
||||
map (dbArg _ptDraw) (_particles w) ++
|
||||
[ testPic w
|
||||
, concatMap drawItem . IM.elems $ _floorItems w
|
||||
, concatMap (crDraw w) . IM.elems $ _creatures w
|
||||
, concatMap clDraw . reverse $ _clouds w
|
||||
, concatMap ppDraw . IM.elems $ _pressPlates w
|
||||
, concatMap btDraw (IM.elems (_buttons w))
|
||||
, concatMap (dbArg _ptDraw) $ _particles w
|
||||
, concatMap drawWallFloor (wallFloorsToDraw w)
|
||||
worldPictures w = pictures
|
||||
[pictures (_decorations w)
|
||||
,concatMapPic (dbArg _pjDraw) $ _projectiles w
|
||||
,concatMapPic (crDraw w) $ _creatures w
|
||||
,concatMapPic (dbArg _ptDraw) $ _particles w
|
||||
,testPic w
|
||||
,concatMapPic drawItem $ _floorItems w
|
||||
,concatMapPic (crDraw w) $ _creatures w
|
||||
,concatMapPic clDraw $ _clouds w
|
||||
,concatMapPic ppDraw $ _pressPlates w
|
||||
,concatMapPic btDraw $ _buttons w
|
||||
,concatMapPic drawWallFloor $ wallFloorsToDraw w
|
||||
]
|
||||
|
||||
foregroundPics :: World -> [Polyhedra]
|
||||
foregroundPics = _foregroundDecorations
|
||||
|
||||
@@ -58,7 +59,7 @@ customMouseCursor w =
|
||||
$ pictures [ line [V2 (-5) 0,V2 5 0] , line [V2 0 (-5),V2 0 5] ]
|
||||
|
||||
testPic :: World -> Picture
|
||||
testPic _ = []
|
||||
testPic _ = blank
|
||||
|
||||
-- [ setDepth (-1) . translate 0 0.8
|
||||
-- . scale 0.001 0.001 . text . show $ _crMvDir $ you w
|
||||
|
||||
Reference in New Issue
Block a user