Add Read/Show instance for Creature
This commit is contained in:
@@ -9,7 +9,10 @@ module Dodge.Creature.Picture
|
||||
, picAtCrPos
|
||||
, shapeAtCrPos
|
||||
, picAtCrPosNoRot
|
||||
, basicCrCorpse
|
||||
-- , basicCrCorpse
|
||||
, deadScalp
|
||||
, deadUpperBody
|
||||
, deadFeet
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Creature.HandPos (translateToRightHand,translateToLeftHand)
|
||||
@@ -230,15 +233,3 @@ picAtCrPosNoRot :: Picture -> Creature -> SPic
|
||||
--{-# INLINE picAtCrPos #-}
|
||||
picAtCrPosNoRot thePic cr = (,) emptySH $ uncurryV translate (_crPos cr) thePic
|
||||
|
||||
basicCrCorpse :: Creature -> Corpse -> SPic
|
||||
basicCrCorpse cr cp = noPic . tr . scaleSH (V3 crsize crsize crsize) $ mconcat
|
||||
[ rotdir . colorSH (_skinHead cskin) $ deadScalp cr
|
||||
, rotdir $ colorSH (_skinUpper cskin) $ deadUpperBody cr
|
||||
, rotdir . rotmdir $ colorSH (_skinLower cskin) $ deadFeet cr
|
||||
]
|
||||
where
|
||||
cskin = _crType cr -- this should be fixed
|
||||
crsize = 0.1 * _crRad cr
|
||||
tr = uncurryV translateSHf (_cpPos cp)
|
||||
rotdir = rotateSH (_cpDir cp)
|
||||
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
|
||||
|
||||
Reference in New Issue
Block a user