Remove external corpses, handle them as creatures
This commit is contained in:
@@ -28,7 +28,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 _foregroundShapes)
|
||||
<> foldup (shiftDraw' _cpPos _cpDir _cpSPic) (filtOn _cpPos _corpses)
|
||||
-- <> foldup (shiftDraw' _cpPos _cpDir _cpSPic) (filtOn _cpPos _corpses)
|
||||
<> foldup (drawCreature (u ^. uvWorld . cWorld . lWorld . items))
|
||||
(filtOn _crPos _creatures)
|
||||
<> foldup (Prelude.uncurry floorItemSPic) (IM.intersectionWith (,) (u^.uvWorld.cWorld.lWorld.items) (filtOn _flItPos _floorItems))
|
||||
@@ -62,6 +62,8 @@ drawPulseBall pb =
|
||||
drawCreature :: IM.IntMap Item -> Creature -> SPic
|
||||
drawCreature m cr = translateSPz (_crZ cr) . uncurryV translateSPxy (_crPos cr) . rotateSP (_crDir cr) $
|
||||
case cr ^. crType of
|
||||
_ | CrIsCorpse sp <- cr ^. crHP -> sp
|
||||
_ | null (cr ^? crHP . _HP) -> mempty
|
||||
BarrelCrit{} -> barrelShape
|
||||
LampCrit{_lampHeight = h} -> lampCrSPic h
|
||||
_ -> basicCrPict m cr
|
||||
@@ -82,11 +84,11 @@ shiftDraw fpos fdir fdraw x =
|
||||
. rotateSP (fdir x)
|
||||
$ fdraw x x
|
||||
|
||||
shiftDraw' :: (a -> Point2) -> (a -> Float) -> (a -> SPic) -> a -> SPic
|
||||
shiftDraw' fpos fdir fdraw x =
|
||||
uncurryV translateSPxy (fpos x)
|
||||
. rotateSP (fdir x)
|
||||
$ fdraw x
|
||||
--shiftDraw' :: (a -> Point2) -> (a -> Float) -> (a -> SPic) -> a -> SPic
|
||||
--shiftDraw' fpos fdir fdraw x =
|
||||
-- uncurryV translateSPxy (fpos x)
|
||||
-- . rotateSP (fdir x)
|
||||
-- $ fdraw x
|
||||
|
||||
cullPoint :: Config -> World -> Point2 -> Bool
|
||||
cullPoint cfig w p
|
||||
|
||||
Reference in New Issue
Block a user