Add explicit layer datatype

This commit is contained in:
2022-04-10 10:48:17 +01:00
parent edd82fb3ac
commit 77c3f83d20
27 changed files with 75 additions and 70 deletions
+2 -2
View File
@@ -37,11 +37,11 @@ lamp h = defaultInanimate
}
lampCrPic :: Float -> Picture
lampCrPic h = pictures
[ setLayer 1 (setDepth h . color white $ circleSolid 3)
[ setLayer BloomLayer (setDepth h . color white $ circleSolid 3)
, concatMap (polyToTris . map f) $ boxXYZnobase 5 5 (h-1)
]
where
f pos = Verx (pos -.-.- V3 2.5 2.5 0) blue [] (LayNum 0) polyNum
f pos = Verx (pos -.-.- V3 2.5 2.5 0) blue [] BottomLayer polyNum
initialiseLamp :: Float -> Creature -> World -> World
initialiseLamp = initialiseColorLamp 0.75
+3 -3
View File
@@ -13,7 +13,7 @@ module Dodge.Creature.Picture
import Dodge.Data
--import Dodge.Base
import Dodge.Creature.Test
import Dodge.Render.InfoBox
--import Dodge.Render.InfoBox
import Dodge.Render.List
--import Dodge.Creature.AlertLevel.Data
--import Dodge.Picture.Layer
@@ -87,7 +87,7 @@ crDisplayInfo cfig w cr = (_crPos cr,
crOnScreen = pointOnScreen cfig w $ _crPos cr
creatureDisplayText :: Configuration -> World -> Creature -> Picture
creatureDisplayText cfig w cr = setLayer 4 . setDepth 50
creatureDisplayText cfig w cr = setLayer FixedCoordLayer . setDepth 50
$ color white $ renderListAt 0 0 cfig $ zip ["TEST","ME"] $ repeat white
-- $ renderInfoListAt 0 0 cfig w
-- $ crDisplayInfo cfig w cr
@@ -96,7 +96,7 @@ creatureDisplayText' :: Configuration -> World -> Creature -> Picture
creatureDisplayText' cfig w cr
| not (_debug_cr_status cfig) = []
| otherwise
= setLayer 4
= setLayer TopLayer
. setDepth 50
. translate x y
. color white