Reorganise render collections
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
module Dodge.Render.ShapePicture
|
||||
( floorItemSPic
|
||||
, worldSPic
|
||||
( worldSPic
|
||||
)
|
||||
where
|
||||
import Dodge.Config.Data
|
||||
@@ -13,14 +12,17 @@ import Dodge.SoundLogic.LoadSound
|
||||
import Dodge.Graph
|
||||
import Dodge.GameRoom
|
||||
import Dodge.Update.Camera
|
||||
--import Dodge.Zone
|
||||
import Geometry
|
||||
import ShapePicture
|
||||
import Shape
|
||||
import Picture
|
||||
import Sound.Data
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.IntMap.Strict as IM -- Lazy?
|
||||
import qualified Data.Map.Strict as M
|
||||
--import Control.Lens
|
||||
--import Data.Maybe
|
||||
|
||||
worldSPic :: World -> SPic
|
||||
worldSPic w =
|
||||
@@ -106,3 +108,32 @@ viewBoundaries w
|
||||
where
|
||||
p = _crPos $ you w
|
||||
grs = filter (pointInOrOnPolygon p . _grBound) (_gameRooms w)
|
||||
|
||||
--wallFloorsToDraw :: World -> [Wall]
|
||||
--wallFloorsToDraw w = filter isVisible $ IM.elems $ wallsOnScreen w
|
||||
-- where
|
||||
-- onScreen wall = uncurry (lineOnScreen w) $ _wlLine wall
|
||||
-- isVisible wl
|
||||
-- | wl ^? wlDraw == Just False = False
|
||||
-- | otherwise = onScreen wl
|
||||
--
|
||||
--lineOnScreen :: World -> Point2 -> Point2 -> Bool
|
||||
--lineOnScreen w p1 p2 = pointInPolygon p1 sp
|
||||
-- || pointInPolygon p2 sp
|
||||
-- || any (isJust . uncurry (intersectSegSeg p1 p2)) sps
|
||||
-- where
|
||||
-- sp = screenPolygon w
|
||||
-- sps = zip sp (tail sp ++ [head sp])
|
||||
--
|
||||
--drawWallFloor :: Wall -> Picture
|
||||
--drawWallFloor wl = if _wlOpacity wl == SeeThrough
|
||||
-- then setDepth 0.9 . color c $ polygon [x,x +.+ n2,y+.+n2, y]
|
||||
-- else blank
|
||||
-- where
|
||||
-- (x,y) = _wlLine wl
|
||||
-- c = _wlColor wl
|
||||
-- n2 = 15 *.* (vNormal . errorNormalizeVDR $ y -.- x)
|
||||
--
|
||||
--errorNormalizeVDR :: Point2 -> Point2
|
||||
--errorNormalizeVDR (V2 0 0) = error "problem with function: errorNormalizeVDR in DodgeRendering"
|
||||
--errorNormalizeVDR p = normalizeV p
|
||||
|
||||
Reference in New Issue
Block a user