Add line shadow shader
This commit is contained in:
@@ -12,7 +12,7 @@ import Dodge.Creature.State.Data
|
||||
import Dodge.Creature.Stance.Data
|
||||
import Dodge.Creature.Test
|
||||
--import Dodge.Creature.AlertLevel.Data
|
||||
import Dodge.Picture.Layer
|
||||
--import Dodge.Picture.Layer
|
||||
import Dodge.Item.Data
|
||||
import Picture
|
||||
import Geometry
|
||||
@@ -27,7 +27,8 @@ basicCrPict
|
||||
-> Picture
|
||||
basicCrPict col cr w = pictures $
|
||||
targetingPic ++
|
||||
[ tr . piercingMod $ bluntScale $ naked col cr
|
||||
[ tr . setDepth 0 $ color yellow $ circleSolid 10
|
||||
, tr . piercingMod $ bluntScale $ naked col cr
|
||||
, tr $ waist col
|
||||
, trFeet $ feet cr
|
||||
, tr $ arms col cr
|
||||
@@ -55,7 +56,7 @@ basicCrPict col cr w = pictures $
|
||||
pastDams = _crPastDamage $ _crState cr
|
||||
|
||||
waist :: Color -> Picture
|
||||
waist col = setDepth 0.025 . color (light4 col) . scale 0.5 1 $ circleSolid 8
|
||||
waist col = setDepth 10 . color (light4 col) . scale 0.5 1 $ circleSolid 8
|
||||
|
||||
feet :: Creature -> Picture
|
||||
feet cr = case cr ^? crStance . carriage of
|
||||
@@ -73,7 +74,7 @@ feet cr = case cr ^? crStance . carriage of
|
||||
]
|
||||
where
|
||||
--setL = onLayerL [levLayer CrLayer, -5] . color (greyN 0.3) . pictures
|
||||
setL = setDepth 0.049 . color (greyN 0.3) . pictures
|
||||
setL = setDepth 1 . color (greyN 0.3) . pictures
|
||||
off = 5
|
||||
sLen = _strideLength $ _crStance cr
|
||||
f i = 6 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
@@ -92,7 +93,7 @@ arms col cr
|
||||
where
|
||||
sc = scale 1 1
|
||||
--setL = onLayerL [levLayer CrLayer, -4] . color (light4 col) . pictures
|
||||
setL = setDepth 0.02 . color (light4 col) . pictures
|
||||
setL = setDepth 20 . color (light4 col) . pictures
|
||||
off = 8
|
||||
sLen = _strideLength $ _crStance cr
|
||||
f i = negate 2 + negate 6 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
@@ -102,30 +103,30 @@ arms col cr
|
||||
|
||||
naked :: Color -> Creature -> Picture
|
||||
naked col cr
|
||||
| strikeMelee = onCrL . color white $ circleSolid $ _crRad cr
|
||||
| pdam > 200 = onCrL . color red $ circleSolid $ _crRad cr
|
||||
| pdam > 99 = onCrL . color white $ circleSolid $ _crRad cr
|
||||
| strikeMelee = shoulderH . color white $ circleSolid $ _crRad cr
|
||||
| pdam > 200 = shoulderH . color red $ circleSolid $ _crRad cr
|
||||
| pdam > 99 = shoulderH . color white $ circleSolid $ _crRad cr
|
||||
| aimingOneHand = rotate (negate twistA * 0.5) $ pictures
|
||||
[ translate (0.25 * crad) 0 fhead
|
||||
, onCrL . translate 8 (-8) . color col' $ circleSolid 4
|
||||
, shoulderH . 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
|
||||
[ 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
|
||||
, shoulderH . translate 12 4 . color col' $ circleSolid 4
|
||||
, shoulderH . translate 4 (-10) . color col' $ circleSolid 4
|
||||
, shoulderH . rotate (negate 0.2) . translate 2 3 . rotate (negate 0.4) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
|
||||
, shoulderH . rotate (negate 0.2) . translate 0 (negate 3) . rotate 0.2 . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
|
||||
]
|
||||
| otherwise = onCrL $ pictures
|
||||
| otherwise = pictures
|
||||
[ 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
|
||||
, shoulderH . translate 0 3 . rotate (negate 0.2) . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
|
||||
, shoulderH . translate 0 (negate 3) . rotate 0.2 . scale 0.5 1 $ color col' $ circleSolid $ _crRad cr
|
||||
]
|
||||
where
|
||||
fhead = setDepth (negate 0.01) $ circleSolid $ crad * 0.5
|
||||
onCrL = setDepth 0
|
||||
fhead = setDepth 30 $ circleSolid $ crad * 0.5
|
||||
shoulderH = setDepth 20
|
||||
twistA = negate 1
|
||||
aimingOneHand = crIsAiming' cr && crIt ^? itAimStance == Just OneHand
|
||||
aimingTwist = crIsAiming' cr && crIt ^? itAimStance == Just TwoHandTwist
|
||||
|
||||
Reference in New Issue
Block a user