Major item refactor, still broken
This commit is contained in:
@@ -28,7 +28,8 @@ worldSPic cfig u =
|
||||
<> 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 drawCreature (filtOn _crPos _creatures)
|
||||
<> foldup (drawCreature (u ^. uvWorld . cWorld . lWorld . items))
|
||||
(filtOn _crPos _creatures)
|
||||
<> foldup (Prelude.uncurry floorItemSPic) (IM.intersectionWith (,) (u^.uvWorld.cWorld.lWorld.items) (filtOn _flItPos (_floorItems)))
|
||||
<> foldup btSPic (filtOn _btPos _buttons)
|
||||
<> foldup (mcSPic (u ^. uvWorld . cWorld . lWorld)) (filtOn _mcPos _machines)
|
||||
@@ -57,12 +58,12 @@ drawPulseBall pb =
|
||||
. setLayer BloomLayer
|
||||
$ circleSolidCol green white 10
|
||||
|
||||
drawCreature :: Creature -> SPic
|
||||
drawCreature cr = translateSPz (_crZ cr) . uncurryV translateSPxy (_crPos cr) . rotateSP (_crDir cr) $
|
||||
drawCreature :: IM.IntMap Item -> Creature -> SPic
|
||||
drawCreature m cr = translateSPz (_crZ cr) . uncurryV translateSPxy (_crPos cr) . rotateSP (_crDir cr) $
|
||||
case cr ^. crType of
|
||||
BarrelCrit{} -> barrelShape
|
||||
LampCrit{_lampHeight = h} -> lampCrSPic h
|
||||
_ -> basicCrPict cr
|
||||
_ -> basicCrPict m cr
|
||||
|
||||
barrelShape :: SPic
|
||||
barrelShape = noPic $ cylinderPoly Medium Important (map (addZ 20) ps) (map (addZ 0) ps)
|
||||
|
||||
Reference in New Issue
Block a user