Add creature info display

This commit is contained in:
2022-04-10 23:07:11 +01:00
parent 0cc12f31ad
commit 12852a7670
5 changed files with 47 additions and 29 deletions
+2 -19
View File
@@ -11,10 +11,10 @@ module Dodge.Creature.Picture
, picAtCrPosNoRot
) where
import Dodge.Data
--import Dodge.Base
import Dodge.Base
import Dodge.Creature.Test
import Dodge.Render.InfoBox
import Dodge.Render.List
--import Dodge.Render.List
--import Dodge.Creature.AlertLevel.Data
--import Dodge.Picture.Layer
import Dodge.Clock
@@ -74,25 +74,8 @@ basicCrShape col cr = tr . scaleSH (V3 crsize crsize crsize) $ mconcat
rotmdir = rotateSH (_crMvDir cr)
. colorSH (greyN 0.3)
crDisplayInfo :: Configuration -> World -> Creature -> (Point2,[String])
crDisplayInfo cfig w cr = (_crPos cr,
[show $_crGoal ap
,show $ _crStrategy ap
,show $ _crAction ap
,show $ _crImpulse ap
]
)
where
ap = _crActionPlan cr
crOnScreen = pointOnScreen cfig w $ _crPos cr
creatureDisplayText :: Configuration -> World -> Creature -> Picture
creatureDisplayText cfig w cr
= setLayer FixedCoordLayer $ renderInfoListAt 0 0 cfig w
$ crDisplayInfo cfig w cr
creatureDisplayText' :: Configuration -> World -> Creature -> Picture
creatureDisplayText' cfig w cr
| not (_debug_cr_status cfig) = []
| otherwise
= setLayer DebugLayer