Refactor crPos to be a V3
This commit is contained in:
@@ -26,7 +26,7 @@ worldSPic cfig u =
|
||||
<> foldup drawPulseBall (filtOn _pbPos _pulseBalls)
|
||||
<> foldup (shiftDraw _blPos _blDir (drawBlock . _blDraw)) (filtOn _blPos _blocks)
|
||||
<> foldup (shiftDraw _fsPos _fsDir (const _fsSPic)) (filtOn _fsPos _foreShapes)
|
||||
<> foldup (drawCreature (lw ^. items)) (filtOn _crPos _creatures)
|
||||
<> foldup (drawCreature (lw ^. items)) (filtOn (^. crPos . _xy) _creatures)
|
||||
<> foldup
|
||||
(Prelude.uncurry floorItemSPic)
|
||||
( IM.intersectionWith
|
||||
@@ -65,7 +65,7 @@ drawPulseBall pb =
|
||||
$ circleSolidCol green white 10
|
||||
|
||||
drawCreature :: IM.IntMap Item -> Creature -> SPic
|
||||
drawCreature m cr = translateSPz (_crZ cr) . uncurryV translateSPxy (_crPos cr) . rotateSP (_crDir cr) $
|
||||
drawCreature m cr = translateSP (_crPos cr) . rotateSP (_crDir cr) $
|
||||
case cr ^. crType of
|
||||
_ | CrIsCorpse sp <- cr ^. crHP -> sp
|
||||
_ | null (cr ^? crHP . _HP) -> mempty
|
||||
|
||||
Reference in New Issue
Block a user