diff --git a/src/Dodge/Data/EnergyBall.hs b/src/Dodge/Data/EnergyBall.hs index 47b30fa51..1d0e10156 100644 --- a/src/Dodge/Data/EnergyBall.hs +++ b/src/Dodge/Data/EnergyBall.hs @@ -19,7 +19,7 @@ data EnergyBall = EnergyBall , _ebWidth :: Float , _ebTimer :: Int , _ebEff :: (DamageType, Int) - , _ebZ :: Float +-- , _ebZ :: Float , _ebRot :: Float } deriving (Eq, Ord, Show, Read) --Generic, Flat) diff --git a/src/Dodge/EnergyBall.hs b/src/Dodge/EnergyBall.hs index 41b3b542d..1a122c0d6 100644 --- a/src/Dodge/EnergyBall.hs +++ b/src/Dodge/EnergyBall.hs @@ -38,7 +38,7 @@ makeFlamelet (V2 x y) z vel size time w = , _ebWidth = size , _ebTimer = time , _ebEff = (FLAMING, 1) - , _ebZ = z +-- , _ebZ = z , _ebRot = rot } where @@ -72,7 +72,7 @@ incBallAt p w = , _ebWidth = 3 , _ebTimer = 20 , _ebEff = (FLAMING, 1) - , _ebZ = 20 +-- , _ebZ = 20 , _ebRot = rot } @@ -92,7 +92,7 @@ makeFlashBall p w = , _ebWidth = 3 , _ebTimer = 20 , _ebEff = (LASERING, 1) - , _ebZ = 20 +-- , _ebZ = 20 , _ebRot = rot } diff --git a/src/Dodge/EnergyBall/Draw.hs b/src/Dodge/EnergyBall/Draw.hs index 2771dc178..5e1335ec2 100644 --- a/src/Dodge/EnergyBall/Draw.hs +++ b/src/Dodge/EnergyBall/Draw.hs @@ -1,4 +1,6 @@ -module Dodge.EnergyBall.Draw where +module Dodge.EnergyBall.Draw ( + drawEnergyBall, +) where import Dodge.Data.Damage.Type import Dodge.Data.EnergyBall @@ -16,7 +18,8 @@ drawStaticBall :: Picture drawStaticBall pt = setLayer BloomNoZWrite - . setDepth (_ebZ pt + 20) + . setDepth 20 + -- . setDepth (_ebZ pt + 20) . uncurryV translate (_ebPos pt) $ circleSolidCol (_ebColor pt) (withAlpha 0.5 white) (_ebWidth pt + 5) @@ -28,7 +31,8 @@ drawFlamelet pt = , setLayer BloomNoZWrite pi2 ] where - z = _ebZ pt + z = 20 + -- z = _ebZ pt sp = _ebPos pt vel = _ebVel pt ep = sp +.+ vel @@ -47,7 +51,7 @@ drawFlamelet pt = ) . rotate (negate (rot - 0.1 * fromIntegral time)) . scale s1 s1 - . polygon + . polygon $ reverse (rectNSWE siz2 (- siz2) (- siz2) siz2) pi2 = setDepth (z + 25) @@ -61,7 +65,7 @@ drawFlamelet pt = ) . rotate (negate (rot + 0.2 * fromIntegral time)) . scale s2 s2 - . polygon + . polygon . reverse $ rectNSWE siz2 (- siz2) (- siz2) siz2 pic = diff --git a/src/Dodge/WorldEvent/Explosion.hs b/src/Dodge/WorldEvent/Explosion.hs index f1e00f074..a5a79454d 100644 --- a/src/Dodge/WorldEvent/Explosion.hs +++ b/src/Dodge/WorldEvent/Explosion.hs @@ -10,7 +10,6 @@ module Dodge.WorldEvent.Explosion ( import Control.Monad import Data.List -import Dodge.Base.Collide import Dodge.Data.World import Dodge.EnergyBall import Dodge.Flame @@ -88,17 +87,10 @@ makeExplosionAt p vel w = let (a, b, c) = unzip3 $ map fromV3 fPs'' in (zipWith V2 a b, c) --fPs = map (pushAgainstWalls . (+.+) p . (*.*) 0.5) fPs' - fPs = map (pushAgainstWalls . (+.+) p) fPs' inversePushOut v = (15 - magV v) * 0.01 *.* v fVs' = zipWith (+.+) fVs $ map inversePushOut fPs' sizes = randomRs (2, 9) $ _randGen w times = randomRs (15, 20) $ _randGen w mF q z v size time = makeFlamelet (q - vel) z (v + vel) size time - --newFs = zipWith5 mF fPs zs (fmap (3 *.*) fVs') sizes times newFs = zipWith4 (mF p) zs (zipWith ((+) . xyV3) fPs'' (fmap (3 *.*) fVs')) sizes times addFlames w' = foldl' (flip ($)) w' newFs - --pushAgainstWalls q = maybe q (uncurry (+.+)) $ reflectPointWalls p q wls - --pushAgainstWalls q = maybe q fst $ reflectPointWalls p q wls - pushAgainstWalls q = maybe q fst $ bouncePoint (const True) 1 p q w - --- wls = wallsNearPoint p w diff --git a/src/Dodge/WorldEvent/SpawnParticle.hs b/src/Dodge/WorldEvent/SpawnParticle.hs index bf6cec0e6..b85fe6fcc 100644 --- a/src/Dodge/WorldEvent/SpawnParticle.hs +++ b/src/Dodge/WorldEvent/SpawnParticle.hs @@ -48,7 +48,7 @@ aStaticBall p = , _ebWidth = 3 , _ebTimer = 20 , _ebEff = (ELECTRICAL, 10) - , _ebZ = 20 +-- , _ebZ = 20 , _ebRot = 0 }