Remove _decorations
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
All good (595 modules, at 09:13:37)
|
||||
All good (0 modules, at 09:18:01)
|
||||
|
||||
@@ -52,7 +52,6 @@ data PSType
|
||||
| PutDoor Color EdgeObstacle WdBl [(Point2, Point2)]
|
||||
| RandPS (State StdGen PSType)
|
||||
| PutForeground ForegroundShape
|
||||
| PutDecoration Picture
|
||||
| PutWorldUpdate (PlacementSpot -> World -> World)
|
||||
| PutNothing
|
||||
| PutUsingGenParams (World -> (World, PSType))
|
||||
|
||||
@@ -131,7 +131,6 @@ data LWorld = LWorld
|
||||
, _delayedEvents :: [(Int, WdWd)]
|
||||
, _pressPlates :: IM.IntMap PressPlate
|
||||
, _buttons :: IM.IntMap Button
|
||||
, _decorations :: IM.IntMap Picture
|
||||
, _foregroundShapes :: IM.IntMap ForegroundShape
|
||||
, _corpses :: IM.IntMap Corpse
|
||||
, _lightSources :: IM.IntMap LightSource
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
module Dodge.Debug.LinkDecoration (
|
||||
addRoomLinkDecorations,
|
||||
addRoomPolyDecorations,
|
||||
) where
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Data.GenWorld
|
||||
import Dodge.RoomLink
|
||||
import Geometry.Data
|
||||
import Geometry.Vector
|
||||
import qualified IntMapHelp as IM
|
||||
import Picture
|
||||
|
||||
addRoomPolyDecorations :: [Room] -> World -> World
|
||||
addRoomPolyDecorations rms w =
|
||||
w & cWorld . lWorld . decorations
|
||||
%~ IM.insertWithNewKeys (map roomPolyDecorations rms)
|
||||
|
||||
addRoomLinkDecorations :: [Room] -> World -> World
|
||||
addRoomLinkDecorations rms w =
|
||||
w & cWorld . lWorld . decorations
|
||||
%~ IM.insertWithNewKeys (map roomLinkDecorations rms)
|
||||
|
||||
roomLinkDecorations :: Room -> Picture
|
||||
roomLinkDecorations rm = foldMap (linkDecoration . lnkPosDir) $ _rmLinks rm
|
||||
|
||||
linkDecoration :: (Point2, Float) -> Picture
|
||||
linkDecoration (p, a) = setLayer DebugLayer . color red $ line [p, p +.+ 20 *.* unitVectorAtAngle (a - pi / 2)]
|
||||
|
||||
roomPolyDecorations :: Room -> Picture
|
||||
roomPolyDecorations rm = foldMap polyWireFrame $ _rmPolys rm
|
||||
|
||||
polyWireFrame :: [Point2] -> Picture
|
||||
polyWireFrame (x : xs) = setLayer DebugLayer . setDepth 50 . color green $ line $ (x : xs) ++ [x]
|
||||
polyWireFrame _ = undefined
|
||||
@@ -132,7 +132,6 @@ defaultLWorld =
|
||||
, _pressPlates = IM.empty
|
||||
, _buttons = IM.empty
|
||||
, _corpses = IM.empty
|
||||
, _decorations = IM.empty
|
||||
, _lightSources = IM.empty
|
||||
, _tempLightSources = []
|
||||
, _seenLocations =
|
||||
|
||||
@@ -119,7 +119,6 @@ placeSpotID' ps pt w = case pt of
|
||||
w
|
||||
PutCrit cr -> plNewUpID (cWorld . lWorld . creatures) crID (mvCr p rot cr) w
|
||||
PutForeground fs -> plNewUpID (cWorld . lWorld . foregroundShapes) fsID (mvFS p rot fs) w
|
||||
PutDecoration pic -> plNewID (cWorld . lWorld . decorations) (shiftDec p rot pic) w
|
||||
PutMachine pps mc wl -> plMachine (map doShift pps) mc wl p rot w
|
||||
PutLS ls -> plNewUpID (cWorld . lWorld . lightSources) lsID (mvLS p' rot ls) w
|
||||
PutPPlate pp -> plNewUpID (cWorld . lWorld . pressPlates) ppID (mvPP p rot pp) w
|
||||
@@ -148,9 +147,6 @@ placeSpotID' ps pt w = case pt of
|
||||
rot = _psRot ps
|
||||
doShift = shiftPointBy (p, rot)
|
||||
|
||||
shiftDec :: Point2 -> Float -> Picture -> Picture
|
||||
shiftDec p r = uncurryV translate p . rotate r
|
||||
|
||||
evaluateRandPS :: State StdGen PSType -> PlacementSpot -> World -> (Int, World)
|
||||
evaluateRandPS rgen ps w = placeSpotID' ps evaluatedType (set randGen g w)
|
||||
where
|
||||
|
||||
@@ -82,8 +82,7 @@ cullPoint cfig w p
|
||||
|
||||
extraPics :: Configuration -> Universe -> Picture
|
||||
extraPics cfig u =
|
||||
fold (_decorations lw)
|
||||
<> setLayer FixedCoordLayer (fixedCoordPictures u)
|
||||
setLayer FixedCoordLayer (fixedCoordPictures u)
|
||||
<> foldMap drawTractorBeam (_tractorBeams lw)
|
||||
<> foldMap drawLinearShockwave (_linearShockwaves lw)
|
||||
<> foldMap drawShockwave (_shockwaves lw)
|
||||
|
||||
@@ -48,7 +48,6 @@ roomC w h = do
|
||||
. setOutLinks (\rl -> OnEdge West `S.member` _rlType rl)
|
||||
)
|
||||
& rmPmnts .:~ wallf (V2 (w / 2) 0) (V2 (w / 2) (h -60))
|
||||
& rmPmnts .:~ sps0 (PutDecoration (highMesh (V2 0 0) (V2 0 h) 50))
|
||||
& rmRandPSs .~ [farside]
|
||||
)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user