Tweak drawing parameters

This commit is contained in:
2021-06-25 18:43:45 +02:00
parent 06a92e70ee
commit 726cd425f2
8 changed files with 36 additions and 31 deletions
+2 -6
View File
@@ -33,12 +33,8 @@ lamp = defaultInanimate
}
lampPic :: Picture
lampPic = pictures
[ setDepth 0 $ color white $ p
, setDepth (negate 0.1) $ color yellow $ p
, setDepth (negate 0.5) $ color green $ p
, setDepth (negate 0.4) $ color red $ p
, setDepth (negate 0.2) $ color blue $ p
, setDepth (negate 1) $ color white $ p
[ setDepth (0.09) $ color white $ p
, setDepth (0) $ color yellow $ p
]
where
p = pictures [circleSolid 3, polygon $ rectNSEW 5 0 5 0]
+13 -8
View File
@@ -28,6 +28,7 @@ basicCrPict
basicCrPict col cr w = pictures $
targetingPic ++
[ tr . piercingMod $ bluntScale $ naked col cr
, tr $ waist col
, trFeet $ feet cr
, tr $ arms col cr
, tr $ drawEquipment cr
@@ -53,6 +54,9 @@ basicCrPict col cr w = pictures $
_ -> id
pastDams = _crPastDamage $ _crState cr
waist :: Color -> Picture
waist col = setDepth 0.025 . color (light4 col) . scale 0.5 1 $ circleSolid 8
feet :: Creature -> Picture
feet cr = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> setL
@@ -68,7 +72,8 @@ feet cr = case cr ^? crStance . carriage of
, translate 0 (-off) $ circleSolid 5
]
where
setL = onLayerL [levLayer CrLayer, -5] . color (greyN 0.3) . pictures
--setL = onLayerL [levLayer CrLayer, -5] . color (greyN 0.3) . pictures
setL = setDepth 0.049 . color (greyN 0.3) . pictures
off = 5
sLen = _strideLength $ _crStance cr
f i = 6 * fromIntegral (sLen - i) / fromIntegral sLen
@@ -86,7 +91,8 @@ arms col cr
_ -> blank
where
sc = scale 1 1
setL = onLayerL [levLayer CrLayer, -4] . color (light4 col) . pictures
--setL = onLayerL [levLayer CrLayer, -4] . color (light4 col) . pictures
setL = setDepth 0.02 . color (light4 col) . pictures
off = 8
sLen = _strideLength $ _crStance cr
f i = negate 2 + negate 6 * fromIntegral (sLen - i) / fromIntegral sLen
@@ -100,27 +106,26 @@ naked col cr
| pdam > 200 = onCrL . color red $ circleSolid $ _crRad cr
| pdam > 99 = onCrL . color white $ circleSolid $ _crRad cr
| aimingOneHand = rotate (negate twistA * 0.5) $ pictures
[ translate (0.25 * crad) 0 $ circleSolid (crad * 0.5)
[ translate (0.25 * crad) 0 fhead
, onCrL . translate 8 (-8) . color col' $ circleSolid 4
, translate 0 3 . rotate (negate 0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
, translate 0 (negate 3) . rotate 0.2 . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
]
| aimingTwist = translate 0 (0.5* crad) . rotate twistA $ pictures
[ aboveIt . translate (negate 0.25 * crad) 0.25 $
circleSolid (crad * 0.5)
[ translate (negate 0.25 * crad) 0.25 fhead
, onCrL . translate 12 4 . color col' $ circleSolid 4
, onCrL . translate 4 (-10) . color col' $ circleSolid 4
, onCrL . rotate (negate 0.2) . translate 2 3 . rotate (negate 0.4) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
, onCrL . rotate (negate 0.2) . translate 0 (negate 3) . rotate 0.2 . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
]
| otherwise = onCrL $ pictures
[ translate (0.25 * crad) 0 $ circleSolid (crad * 0.5)
[ translate (0.25 * crad) 0 fhead
, translate 0 3 . rotate (negate 0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
, translate 0 (negate 3) . rotate 0.2 . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
]
where
aboveIt = onLayer HPtLayer
onCrL = onLayer CrLayer
fhead = setDepth (negate 0.01) $ circleSolid $ crad * 0.5
onCrL = setDepth 0
twistA = negate 1
aimingOneHand = crIsAiming' cr && crIt ^? itAimStance == Just OneHand
aimingTwist = crIsAiming' cr && crIt ^? itAimStance == Just TwoHandTwist