Remove temporary light sources as separate entity

This commit is contained in:
2024-11-26 13:12:55 +00:00
parent e93a804559
commit cc302a6846
17 changed files with 243 additions and 241 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ data LWorld = LWorld
, _foregroundShapes :: IM.IntMap ForegroundShape
, _corpses :: IM.IntMap Corpse
, _lightSources :: IM.IntMap LightSource
, _tempLightSources :: [TempLightSource]
-- , _tempLightSources :: [TempLightSource]
, _lights :: [LSParam]
, _seenLocations :: IM.IntMap (WdP2, String)
, _selLocation :: Int
+21 -21
View File
@@ -13,18 +13,18 @@ import Geometry
data LightSourceDraw = DefaultLightSourceDraw
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data TLSIntensity
= ConstantIntensity
| TLSFade Point3 Int
deriving (Eq, Ord, Show, Read) --Generic, Flat)
--data TLSIntensity
-- = ConstantIntensity
-- | TLSFade Point3 Int
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
--
--data TLSUpdate
-- = DestroyTLS
-- | TimerTLS
-- | IntensityTLS TLSIntensity
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
data TLSUpdate
= DestroyTLS
| TimerTLS
| IntensityTLS TLSIntensity
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data LSParam = LSParam
data LSParam = LSParam -- LSPosRadCol
{ _lsPos :: !Point3
, _lsRad :: !Float
, _lsCol :: !Point3
@@ -39,19 +39,19 @@ data LightSource = LS
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data TempLightSource = TLS
{ _tlsParam :: LSParam
, _tlsUpdate :: TLSUpdate --TempLightSource -> Maybe TempLightSource
, _tlsTime :: Int
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
--data TempLightSource = TLS
-- { _tlsParam :: LSParam
-- , _tlsUpdate :: TLSUpdate --TempLightSource -> Maybe TempLightSource
-- , _tlsTime :: Int
-- }
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''LSParam
makeLenses ''LightSource
makeLenses ''TempLightSource
--makeLenses ''TempLightSource
deriveJSON defaultOptions ''LightSourceDraw
deriveJSON defaultOptions ''TLSIntensity
deriveJSON defaultOptions ''TLSUpdate
--deriveJSON defaultOptions ''TLSIntensity
--deriveJSON defaultOptions ''TLSUpdate
deriveJSON defaultOptions ''LSParam
deriveJSON defaultOptions ''LightSource
deriveJSON defaultOptions ''TempLightSource
--deriveJSON defaultOptions ''TempLightSource