Move towards adding corpses

This commit is contained in:
2022-06-04 12:42:18 +01:00
parent 602a004e87
commit 5f5b1dd422
8 changed files with 40 additions and 18 deletions
+16
View File
@@ -9,6 +9,7 @@ module Dodge.Creature.Picture
, picAtCrPos
, shapeAtCrPos
, picAtCrPosNoRot
, basicCrCorpse
) where
import Dodge.Data
--import Dodge.Base
@@ -264,3 +265,18 @@ picAtCrPos thePic cr _ _ = (,) emptySH $ tranRot (_crPos cr) (_crDir cr) thePic
picAtCrPosNoRot :: Picture -> Creature -> Configuration -> World -> SPic
--{-# INLINE picAtCrPos #-}
picAtCrPosNoRot thePic cr _ _ = (,) emptySH $ uncurryV translate (_crPos cr) thePic
basicCrCorpse :: Creature -> SPic
basicCrCorpse cr = noPic . tr . scaleSH (V3 crsize crsize crsize) $ mconcat
[ --rotdir . _spShape $ drawEquipment cr
rotdir . dm . colorSH (_skinHead cskin) . translateSHz 20 $ scalp cr
, rotdir . dm $ colorSH (_skinUpper cskin) $ upperBody cr
, dm . rotmdir $ colorSH (_skinLower cskin) $ feet cr
]
where
cskin = _crSkin cr
crsize = 0.1 * _crRad cr
dm = damageModSH cr
tr = uncurryV translateSHf (_crPos cr)
rotdir = rotateSH (_crDir cr)
rotmdir = rotateSH (_crMvDir cr)