Prop reification/splitting
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
module Dodge.Render.ShapePicture
|
||||
( worldSPic
|
||||
) where
|
||||
import Dodge.LinearShockwave.Draw
|
||||
import Dodge.Prop.Draw
|
||||
import Dodge.TractorBeam.Draw
|
||||
import Dodge.Shockwave.Draw
|
||||
import Dodge.Tesla.Arc.Draw
|
||||
import Dodge.Laser.Draw
|
||||
@@ -62,7 +65,7 @@ singleSPic = id
|
||||
worldSPic :: Configuration -> World -> SPic
|
||||
worldSPic cfig w
|
||||
= singleSPic (mempty, extraPics cfig w)
|
||||
<> foldup (dbArg _prDraw) (filtOn _prPos _props)
|
||||
<> foldup drawProp' (filtOn _prPos _props)
|
||||
<> foldup drawProjectile (filtOn _prjPos _projectiles)
|
||||
<> foldup (shiftDraw _blPos _blDir _blDraw) (filtOn _blPos _blocks)
|
||||
<> foldup (shiftDraw _fsPos _fsDir (const _fsSPic)) (filtOn _fsPos _foregroundShapes)
|
||||
@@ -129,6 +132,8 @@ cullPoint cfig w p
|
||||
|
||||
extraPics :: Configuration -> World -> Picture
|
||||
extraPics cfig w = pictures (_decorations w)
|
||||
<> concatMapPic drawTractorBeam (_tractorBeams w)
|
||||
<> concatMapPic drawLinearShockwave (_linearShockwaves w)
|
||||
<> concatMapPic drawShockwave (_shockwaves w)
|
||||
<> concatMapPic drawLaser (_lasersToDraw w)
|
||||
<> concatMapPic drawTeslaArc (_teslaArcs w)
|
||||
|
||||
Reference in New Issue
Block a user