Remove external corpses, handle them as creatures

This commit is contained in:
2025-09-25 09:31:58 +01:00
parent fcb02850d0
commit 23f61081cf
33 changed files with 184 additions and 159 deletions
+2 -2
View File
@@ -3,5 +3,5 @@ import Dodge.Data.Corpse
import ShapePicture
-- not currently used, too simple
drawCorpse :: Corpse -> SPic
drawCorpse = _cpSPic
--drawCorpse :: Corpse -> SPic
--drawCorpse = _cpSPic
+18 -16
View File
@@ -4,19 +4,21 @@ import Dodge.Creature.Radius
import Dodge.Creature.Shape
import Control.Lens
import Dodge.Creature.Picture
import Dodge.Data.Corpse
--import Dodge.Data.Corpse
import Dodge.Data.Creature
import Geometry
import Shape
import ShapePicture
makeCorpse :: Creature -> Corpse
--makeCorpse :: Creature -> Corpse
makeCorpse :: Creature -> SPic
makeCorpse cr =
defaultCorpse
& cpPos .~ _crPos cr
& cpDir .~ _crDir cr
& cpSPic
.~ noPic
-- defaultCorpse
-- & cpPos .~ _crPos cr
-- & cpDir .~ _crDir cr
-- & cpSPic
-- .~
noPic
( scaleSH (V3 crsize crsize crsize) $
mconcat
[ colorSH (_skinHead cskin) $ deadScalp cr
@@ -29,12 +31,12 @@ makeCorpse cr =
crsize = 0.1 * crRad (cr ^. crType)
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
defaultCorpse :: Corpse
defaultCorpse =
Corpse
{ _cpID = 0
, _cpPos = 0
, _cpDir = 0
, _cpSPic = mempty
, _cpRes = NoResurrection
}
--defaultCorpse :: Corpse
--defaultCorpse =
-- Corpse
-- { _cpID = 0
-- , _cpPos = 0
-- , _cpDir = 0
-- , _cpSPic = mempty
-- , _cpRes = NoResurrection
-- }