Refactor crPos to be a V3

This commit is contained in:
2025-10-10 13:47:31 +01:00
parent 98ece551c7
commit 49fb982877
58 changed files with 375 additions and 307 deletions
+2 -2
View File
@@ -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