Data-ify item drawing

This commit is contained in:
2022-07-11 00:33:59 +01:00
parent 75cd15c240
commit ad84e69d05
15 changed files with 102 additions and 81 deletions
+5 -3
View File
@@ -15,6 +15,7 @@ import Dodge.Data
import Dodge.Creature.HandPos (translateToRightHand,translateToLeftHand)
import Dodge.Creature.Test
import Dodge.Damage
import Dodge.Item.Draw
import Picture
import Geometry
import Shape
@@ -213,9 +214,10 @@ shoulderSH = translateSHz 20
drawEquipment :: Creature -> SPic
{-# INLINE drawEquipment #-}
drawEquipment cr = foldMap f (_crInv cr)
where
f itm = _itEquipPict itm cr itm
drawEquipment cr = foldMap (itemEquipPict cr) (_crInv cr)
--drawEquipment cr = foldMap f (_crInv cr)
-- where
-- f itm = _itEquipPict itm cr itm
circLine :: Float -> Picture
circLine x = line [V2 0 0,V2 x 0]