Add room foregrounds

This commit is contained in:
jgk
2021-06-16 18:18:03 +02:00
parent 29902b6f22
commit 04ed034a3e
6 changed files with 84 additions and 37 deletions
+4 -32
View File
@@ -7,11 +7,9 @@ import Dodge.Debug.Flag.Data
import Dodge.Config.Data
import Dodge.Config.KeyConfig
import Dodge.Item.Data
import Picture
import Geometry
--import Picture
--import Geometry
--import Picture.Texture
import Data.Tile
import Tile
import System.Random
import qualified Data.IntMap.Strict as IM
@@ -39,23 +37,7 @@ defaultWorld = World
, _wallsZone = IM.empty
, _forceFields = IM.empty
, _floorItems = IM.empty
, _floorTiles = tToRender $ Tile
{ _tilePoly = rectNSWE 200 0 0 200
, _tileCenter = (0,0)
, _tileX = (100,0)
, _tileY = (0,100)
, _tileZ = 16
}
-- let x = 200
-- y = 0.9
-- z = 16
-- r = 8
-- in tileToRender [(0,0,z),(r,0,z),(r,r,z),(0,r,z)]
-- [(20,100 + 20,y)
-- ,( x,100 + 20,y)
-- ,( x,100 + x,y)
-- ,(20,100 + x,y)
-- ]
, _floorTiles = []
, _randGen = mkStdGen 2
, _mousePos = (0,0)
, _testString = []
@@ -95,18 +77,8 @@ defaultWorld = World
, _debugFlags = defaultDebugFlags
, _inventoryMode = TopInventory
, _lClickHammer = HammerUp
, _foregroundDecorations =
[ setDepth (-0.1) $ color orange $ pictures
[ polygon $ rectNSEW 50 40 140 (-20)
, translate 60 45 $ scale 0.5 1 $ thickArc 0 pi 75 10
, translate (-20) 300 $ polygon $ rectNSEW 10 0 40 0
]
, setDepth (-0.2) $ rotate 0.75 $ pictures
$ map f [5,25,45,65]
]
, _foregroundDecorations = []
}
where
f x = polygon $ rectNSEW (x - 20) (x-22) 500 0
defaultDebugFlags :: DebugFlags
defaultDebugFlags = DebugFlags
{ _noClip = False