Cleanup, move towards unifying zones

This commit is contained in:
2021-09-11 15:52:43 +01:00
parent 27e4f16dd9
commit aa7413a29f
57 changed files with 157 additions and 331 deletions
+2 -1
View File
@@ -4,8 +4,9 @@ Explosions: creation of shockwave and particles at a given point.
module Dodge.WorldEvent.Explosion
where
import Dodge.Data
import Dodge.Data.SoundOrigin
import Dodge.Default
import Dodge.Base.Zone
import Dodge.Zone
import Dodge.Base.Collide
import Dodge.WorldEvent.SpawnParticle
--import Dodge.WorldEvent.Flash
+1
View File
@@ -1,6 +1,7 @@
module Dodge.WorldEvent.HitEffect
where
import Dodge.Data
import Dodge.Data.DamageType
import Dodge.Creature.State.Data
import Geometry
+2 -1
View File
@@ -4,10 +4,11 @@ module Dodge.WorldEvent.Shockwave
)
where
import Dodge.Data
import Dodge.Data.DamageType
import Dodge.WorldEvent.DamageBlock
import Dodge.Creature.State.Data
import Dodge.Base
import Dodge.Base.Zone
import Dodge.Zone
import Dodge.Picture.Layer
import Geometry
import Picture
+2
View File
@@ -1,8 +1,10 @@
module Dodge.WorldEvent.Sound
where
import Dodge.Data
import Dodge.Data.SoundOrigin
import Dodge.SoundLogic
import System.Random
import Geometry.Data
import Control.Lens
+3 -1
View File
@@ -4,10 +4,12 @@ Creation of particles in the world.
module Dodge.WorldEvent.SpawnParticle
where
import Dodge.Data
import Dodge.Data.DamageType
import Dodge.Data.SoundOrigin
import Dodge.Default
import Dodge.Creature.State.Data
import Dodge.Base
import Dodge.Base.Zone
import Dodge.Zone
import Dodge.Base.Collide
import Dodge.Picture
--import Dodge.Picture.Layer
+3 -2
View File
@@ -5,7 +5,8 @@ module Dodge.WorldEvent.ThingsHit
where
import Dodge.Data
import Dodge.Base
import Dodge.Base.Zone
import Dodge.Zone
import Dodge.Zone.Data
import Geometry
import qualified Data.IntMap.Strict as IM
@@ -27,7 +28,7 @@ thingsHit sp ep w
-- $ creaturesAlongLine sp ep w
crPs = map (\cr -> ssaTriPoint ep (_crPos cr) sp (_crRad cr)) hitCrs
crs = zip crPs (map E3x1 hitCrs)
hitWls = wallsOnLine sp ep (IM.unions [f b $ f a $ _wallsZone w | a<-[x-1,x,x+1]
hitWls = wallsOnLine sp ep (IM.unions [f b $ f a $ _znObjects $ _wallsZone w | a<-[x-1,x,x+1]
, b<-[y-1,y,y+1]])
(x,y) = zoneOfPoint (0.5 *.* (sp +.+ ep))
f i m = case IM.lookup i m of