Go back to JSON encoding

This commit is contained in:
2022-08-21 21:23:59 +01:00
parent dd62e30026
commit f1ef75f511
95 changed files with 9 additions and 586 deletions
-10
View File
@@ -5,9 +5,6 @@
module Dodge.Data.LightSource where
import TH.Derive
import Data.Store
import Data.Binary
import Flat
import LinearHelp ()
import Control.Lens
@@ -16,22 +13,18 @@ import Data.Aeson.TH
import Geometry
data LightSourceDraw = DefaultLightSourceDraw
| HackLightSourceDraw
deriving (Eq, Ord, Show, Read, Generic, Flat)
$($(derive [d| instance Deriving (Store LightSourceDraw ) |]))
data TLSIntensity
= ConstantIntensity
| TLSFade Point3 Int
deriving (Eq, Ord, Show, Read, Generic, Flat)
$($(derive [d| instance Deriving (Store TLSIntensity) |]))
data TLSUpdate
= DestroyTLS
| TimerTLS
| IntensityTLS TLSIntensity
deriving (Eq, Ord, Show, Read, Generic, Flat)
$($(derive [d| instance Deriving (Store TLSUpdate) |]))
data LSParam = LSParam
{ _lsPos :: !Point3
@@ -39,7 +32,6 @@ data LSParam = LSParam
, _lsCol :: !Point3
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
$($(derive [d| instance Deriving (Store LSParam ) |]))
data LightSource = LS
{ _lsID :: Int
@@ -48,7 +40,6 @@ data LightSource = LS
, _lsPict :: LightSourceDraw --LightSource -> Picture
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
$($(derive [d| instance Deriving (Store LightSource ) |]))
data TempLightSource = TLS
{ _tlsParam :: LSParam
@@ -56,7 +47,6 @@ data TempLightSource = TLS
, _tlsTime :: Int
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
$($(derive [d| instance Deriving (Store TempLightSource ) |]))
makeLenses ''LSParam
makeLenses ''LightSource