Separate Clouds and Dust

This commit is contained in:
2025-06-25 14:51:15 +01:00
parent d61ea304ad
commit d4b2f23c9d
19 changed files with 341 additions and 213 deletions
+12 -12
View File
@@ -11,31 +11,31 @@ import Data.Aeson
import Data.Aeson.TH
import Geometry
data CloudDraw
= CloudColor Float-- Color -- radius-multiply fade-time color
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Cloud = Cloud
{ _clPos :: Point3
, _clVel :: Point3
-- , _clPict :: CloudDraw
-- , _clRad :: Float
-- , _clAlt :: Float
, _clTimer :: Int
, _clType :: CloudType
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data CloudType
= --SmokeCloud
FlamerSmokeCloud
| RocketCloud
= Smoke
| RocketSmoke
| CryoReleaseCloud
| GasCloud
| Dust Material
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Dust = Dust
{ _dsPos :: Point3
, _dsVel :: Point3
, _dsTimer :: Int
, _dsType :: Material
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Cloud
deriveJSON defaultOptions ''CloudDraw
deriveJSON defaultOptions ''CloudType
deriveJSON defaultOptions ''Cloud
makeLenses ''Dust
deriveJSON defaultOptions ''Dust
+1
View File
@@ -99,6 +99,7 @@ data LWorld = LWorld
, _creatureGroups :: IM.IntMap CrGroupParams
, _itemLocations :: IM.IntMap ItemLocation
, _clouds :: [Cloud]
, _dusts :: [Dust]
, _gusts :: IM.IntMap Gust
, _props :: IM.IntMap Prop
, _projectiles :: IM.IntMap Projectile
+1
View File
@@ -46,6 +46,7 @@ data World = World
, _worldEventFlags :: Set WorldEventFlag
, _crZoning :: IntMap (IntMap IntSet)
, _clZoning :: IntMap (IntMap [Cloud])
, _dsZoning :: IntMap (IntMap [Dust])
, _wlZoning :: IntMap (IntMap IntSet) -- Zoning IM.IntMap Wall
, _pnZoning :: IntMap (IntMap [(Int, Point2)]) --Zoning IM.IntMap Creature
, _peZoning :: IntMap (IntMap (Set PathEdgeNodes))