diff --git a/src/Dodge/Data.hs b/src/Dodge/Data.hs index 696f22091..bca640144 100644 --- a/src/Dodge/Data.hs +++ b/src/Dodge/Data.hs @@ -380,17 +380,7 @@ data WorldBeams = WorldBeams {- Objects without ids. Update themselves, perhaps with side effects. -} data Particle - = PtInvShockwave - { _ptUpdate :: World -> Particle -> (World, Maybe Particle) - , _ptColor :: Color - , _ptPos :: Point2 - , _ptRad :: Float - , _ptDam :: Int - , _ptPush :: Float - , _ptMaxTime :: Int - , _ptTimer :: Int - } - | ShockLine + = ShockLine { _ptUpdate :: World -> Particle -> (World, Maybe Particle) , _ptPointDirs :: [[(Point2,Float)]] , _ptTimer :: Int diff --git a/src/Dodge/Item/Weapon/ExtraEffect.hs b/src/Dodge/Item/Weapon/ExtraEffect.hs index 8f7f51b06..0aaae4c3e 100644 --- a/src/Dodge/Item/Weapon/ExtraEffect.hs +++ b/src/Dodge/Item/Weapon/ExtraEffect.hs @@ -27,7 +27,6 @@ import Dodge.SoundLogic import Dodge.Item.Weapon.LaserPath --import Dodge.Item.Attachment.Data import Dodge.Creature.Test -import Dodge.WorldEvent.HelperParticle import Picture import Geometry.Vector import LensHelp @@ -138,7 +137,7 @@ targetLaserUpdate _ cr w t & tgActive .~ False ) where - (mp, ps) = reflectLaserAlong 0.2 sp ep w + (mp, _) = reflectLaserAlong 0.2 sp ep w sp = _crPos cr +.+ 15 *.* unitVectorAtAngle (_crDir cr) ep = sp +.+ 5000 *.* normalizeV (mouseWorldPos w -.- sp) addLaserPic = lasers .:~ LaserStart diff --git a/src/Dodge/Particle/Draw.hs b/src/Dodge/Particle/Draw.hs index 396818773..5594997b5 100644 --- a/src/Dodge/Particle/Draw.hs +++ b/src/Dodge/Particle/Draw.hs @@ -1,6 +1,5 @@ module Dodge.Particle.Draw where import Dodge.Data -import Geometry import Picture drawParticle :: Particle -> Picture @@ -19,16 +18,16 @@ drawParticle pt = case pt of -- rad = r - (3/4) * r * tFraction -- tFraction = fromIntegral (_ptTimer pt) / fromIntegral (_ptMaxTime pt) -drawInverseShockwave :: Particle -> Picture -drawInverseShockwave pt - = setLayer BloomLayer $ setDepth 20 $ uncurryV translate p - $ color cyan $ thickCircle rad thickness - where - p = _ptPos pt - r = _ptRad pt - t = _ptTimer pt - rad = r - 0.1 * r * fromIntegral (10 - t) - thickness = fromIntegral (10 - t) **2 * rad / 40 +--drawInverseShockwave :: Particle -> Picture +--drawInverseShockwave pt +-- = setLayer BloomLayer $ setDepth 20 $ uncurryV translate p +-- $ color cyan $ thickCircle rad thickness +-- where +-- p = _ptPos pt +-- r = _ptRad pt +-- t = _ptTimer pt +-- rad = r - 0.1 * r * fromIntegral (10 - t) +-- thickness = fromIntegral (10 - t) **2 * rad / 40 --drawTeslaArc :: Particle -> Picture --drawTeslaArc pt = setLayer BloomNoZWrite $ pictures diff --git a/src/Dodge/WorldEvent/Flash.hs b/src/Dodge/WorldEvent/Flash.hs index dc0e84f71..1da4b377f 100644 --- a/src/Dodge/WorldEvent/Flash.hs +++ b/src/Dodge/WorldEvent/Flash.hs @@ -11,7 +11,6 @@ flicker : potentially long, moving, abrupt changes in alpha module Dodge.WorldEvent.Flash ( explosionFlashAt , muzFlareAt - , ptFlicker , flareCircleAt ) where import Dodge.Data @@ -48,9 +47,3 @@ flareCircleAt col alphax tranv = flares .:~ CircFlare explosionFlashAt :: Point2 -> World -> World explosionFlashAt p = tempLightSources .:~ tlsTimeRadFunPos 20 150 (TLSFade 1 10) (addZ 20 p) - -ptFlicker :: Particle -> World -> World -ptFlicker pt - | _ptTimer pt `mod` 7 == 0 = tempLightSources - .:~ tlsTimeRadColPos 1 70 (0.5 *.*.* xyzV4 (_ptColor pt)) (addZ 10 $ _ptPos pt) - | otherwise = id diff --git a/src/Dodge/WorldEvent/Shockwave.hs b/src/Dodge/WorldEvent/Shockwave.hs index 63a7fbf6f..0efcc91d0 100644 --- a/src/Dodge/WorldEvent/Shockwave.hs +++ b/src/Dodge/WorldEvent/Shockwave.hs @@ -2,16 +2,11 @@ module Dodge.WorldEvent.Shockwave ( makeShockwaveAt , inverseShockwaveAt ) where -import Dodge.Zoning.Wall import Dodge.Data -import Dodge.Wall.Damage -import Dodge.Base import Geometry import Picture import LensHelp -import Data.Foldable -import qualified IntMapHelp as IM -- currently very effective against walls makeShockwaveAt :: [Int] -- ^ IDs of invulnerable creatures. diff --git a/src/Dodge/WorldEvent/SpawnParticle.hs b/src/Dodge/WorldEvent/SpawnParticle.hs index 0a78dff15..8efe6f34f 100644 --- a/src/Dodge/WorldEvent/SpawnParticle.hs +++ b/src/Dodge/WorldEvent/SpawnParticle.hs @@ -6,7 +6,6 @@ module Dodge.WorldEvent.SpawnParticle , randParticleAt ) where import Dodge.Data -import Dodge.WorldEvent.Shockwave import RandomHelp import Picture import Geometry