Move towards adding corpses
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user