Some cleanup, sidetracked from inter-room placements

This commit is contained in:
2021-11-12 14:16:16 +00:00
parent 1d5b2ea765
commit 67e164c830
13 changed files with 160 additions and 116 deletions
+23 -6
View File
@@ -1,12 +1,13 @@
{-
Rooms that connect other rooms, blocking sight.
-}
{- Rooms that connect other rooms, blocking sight. -}
module Dodge.Room.Door
where
import Geometry
import Dodge.Room.Data
import Dodge.Default.Room
import Dodge.Placements
import Color
import qualified Data.IntMap.Strict as IM
door :: Room
door = defaultRoom
@@ -17,8 +18,24 @@ door = defaultRoom
, _rmPmnts = [putAutoDoor (V2 0 20) (V2 40 20)]
-- note no bounds
}
where lnks = [(V2 20 35,0)
,(V2 20 5,pi)
]
where
lnks = [(V2 20 35,0)
,(V2 20 5,pi)
]
switchDoor :: Room
switchDoor = defaultRoom
{ _rmPolys = [rectNSWE 40 0 0 40]
, _rmLinks = lnks
, _rmPath = [(V2 20 35,V2 20 5)]
-- door extends into side walls (for shadows as rendered 12/03)
, _rmTriggerPmnts = IM.fromList
[(0,\cond -> putDoubleDoor False red cond (V2 0 20) (V2 40 20) 2)]
-- note no bounds
}
where
lnks = [(V2 20 35,0)
,(V2 20 5,pi)
]