63 lines
1.4 KiB
Haskell
63 lines
1.4 KiB
Haskell
module Dodge.Room.Placement
|
|
where
|
|
import Dodge.Data
|
|
import Dodge.LevelGen.Data
|
|
import Picture
|
|
import Dodge.Creature.Inanimate
|
|
|
|
import Geometry
|
|
|
|
-- module defining helper placements for rooms
|
|
|
|
putLamp = PutCrit lamp
|
|
|
|
singleBlock :: Point2 -> [PlacementSpot]
|
|
singleBlock a = [PS a 0 $ PutBlock [5,20,20] (greyN 0.5)
|
|
$ reverse $ rectNSWE 10 (-10) (-10) 10]
|
|
|
|
blockLine :: Point2 -> Point2 -> PlacementSpot
|
|
blockLine a b = PS
|
|
{ _psPos = (0,0)
|
|
, _psRot = 0
|
|
, _psType = PutLineBlock baseBlockPane 9 9 a b
|
|
}
|
|
|
|
windowLine :: Point2 -> Point2 -> PlacementSpot
|
|
windowLine a b = PS
|
|
{ _psPos = (0,0)
|
|
, _psRot = 0
|
|
, _psType = PutLineBlock baseWindowPane 8 8 a b
|
|
}
|
|
|
|
windowLineType :: Point2 -> Point2 -> PSType
|
|
windowLineType a b = PutLineBlock baseWindowPane 8 8 a b
|
|
|
|
baseBlockPane :: Wall
|
|
baseBlockPane = Block
|
|
{ _wlLine = []
|
|
, _wlID = 0
|
|
, _wlColor = greyN 0.5
|
|
, _wlDraw = Nothing
|
|
, _wlSeen = False
|
|
, _blIDs = []
|
|
, _blHP = 5
|
|
, _wlIsSeeThrough = False
|
|
, _blVisible = True
|
|
, _blShadows = []
|
|
, _blDegrades = [20,20]
|
|
}
|
|
baseWindowPane :: Wall
|
|
baseWindowPane = Block
|
|
{ _wlLine = []
|
|
, _wlID = 0
|
|
, _wlColor = withAlpha 0.2 cyan
|
|
, _wlDraw = Nothing
|
|
, _wlSeen = False
|
|
, _blIDs = []
|
|
, _blHP = 1
|
|
, _wlIsSeeThrough = True
|
|
, _blVisible = True
|
|
, _blShadows = []
|
|
, _blDegrades = [5,5]
|
|
}
|