Data-ify creature drawing (partially)
This commit is contained in:
+9
-8
@@ -356,6 +356,13 @@ data TempLightSource = TLS
|
||||
, _tlsUpdate :: World -> TempLightSource -> Maybe TempLightSource
|
||||
, _tlsTime :: !Int
|
||||
}
|
||||
data CreatureType
|
||||
= Humanoid
|
||||
{ _skinHead :: Color
|
||||
, _skinUpper :: Color
|
||||
, _skinLower :: Color
|
||||
}
|
||||
| DrawnCreature { _cdDraw :: Creature -> SPic }
|
||||
data Creature = Creature
|
||||
{ _crPos :: Point2
|
||||
, _crOldPos :: Point2
|
||||
@@ -364,9 +371,8 @@ data Creature = Creature
|
||||
, _crOldDir :: Float
|
||||
, _crMvDir :: Float
|
||||
, _crTwist :: Float
|
||||
, _crType :: CreatureType
|
||||
, _crID :: Int
|
||||
, _crPict :: Creature -> SPic
|
||||
, _crSkin :: CreatureSkin
|
||||
, _crUpdate :: Creature -> World -> World
|
||||
, _crRad :: Float
|
||||
, _crMass :: Float
|
||||
@@ -398,11 +404,6 @@ data Creature = Creature
|
||||
, _crStatistics :: CreatureStatistics
|
||||
, _crCamouflage :: CamouflageStatus
|
||||
}
|
||||
data CreatureSkin = CreatureSkin
|
||||
{ _skinHead :: Color
|
||||
, _skinUpper :: Color
|
||||
, _skinLower :: Color
|
||||
}
|
||||
data CamouflageStatus
|
||||
= FullyVisible
|
||||
| Invisible
|
||||
@@ -1597,7 +1598,7 @@ makeLenses ''EquipParams
|
||||
makeLenses ''TerminalCommand
|
||||
makeLenses ''TerminalInput
|
||||
makeLenses ''GenParams
|
||||
makeLenses ''CreatureSkin
|
||||
makeLenses ''CreatureType
|
||||
makeLenses ''Corpse
|
||||
----- ROOM LENSES
|
||||
|
||||
|
||||
Reference in New Issue
Block a user