Go back to JSON encoding
This commit is contained in:
+2
-2
@@ -51,8 +51,8 @@ dependencies:
|
|||||||
- linear
|
- linear
|
||||||
- aeson
|
- aeson
|
||||||
- aeson-pretty
|
- aeson-pretty
|
||||||
- store
|
#- store
|
||||||
- binary
|
#- binary
|
||||||
- flat
|
- flat
|
||||||
- th-utilities
|
- th-utilities
|
||||||
- directory
|
- directory
|
||||||
|
|||||||
@@ -6,9 +6,6 @@
|
|||||||
|
|
||||||
module Color where
|
module Color where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Geometry
|
import Geometry
|
||||||
@@ -30,7 +27,6 @@ data PaletteColor
|
|||||||
| WHITE
|
| WHITE
|
||||||
| BLACK
|
| BLACK
|
||||||
deriving (Eq, Ord, Enum, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Enum, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store PaletteColor) |]))
|
|
||||||
|
|
||||||
instance ToJSON PaletteColor where
|
instance ToJSON PaletteColor where
|
||||||
toEncoding = genericToEncoding defaultOptions
|
toEncoding = genericToEncoding defaultOptions
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.ActionPlan where
|
module Dodge.Data.ActionPlan where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -206,9 +203,3 @@ deriveJSON defaultOptions ''Goal
|
|||||||
makeLenses ''ActionPlan
|
makeLenses ''ActionPlan
|
||||||
makeLenses ''Impulse
|
makeLenses ''Impulse
|
||||||
makeLenses ''Action
|
makeLenses ''Action
|
||||||
$($(derive [d| instance Deriving (Store Goal) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ActionPlan) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store RandImpulse) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Impulse) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Action) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Strategy) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.ArcStep where
|
module Dodge.Data.ArcStep where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -22,13 +19,11 @@ data ArcStep = ArcStep
|
|||||||
, _asObject :: CrWlID --Maybe (Either Creature Wall)
|
, _asObject :: CrWlID --Maybe (Either Creature Wall)
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ArcStep ) |]))
|
|
||||||
|
|
||||||
data NextArcStep
|
data NextArcStep
|
||||||
= EndArc
|
= EndArc
|
||||||
| DefaultArcStep
|
| DefaultArcStep
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store NextArcStep) |]))
|
|
||||||
|
|
||||||
makeLenses ''ArcStep
|
makeLenses ''ArcStep
|
||||||
deriveJSON defaultOptions ''ArcStep
|
deriveJSON defaultOptions ''ArcStep
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Beam where
|
module Dodge.Data.Beam where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -60,7 +57,3 @@ deriveJSON defaultOptions ''BeamType
|
|||||||
deriveJSON defaultOptions ''Beam
|
deriveJSON defaultOptions ''Beam
|
||||||
deriveJSON defaultOptions ''BeamDraw
|
deriveJSON defaultOptions ''BeamDraw
|
||||||
deriveJSON defaultOptions ''BeamCombineType
|
deriveJSON defaultOptions ''BeamCombineType
|
||||||
$($(derive [d| instance Deriving (Store Beam ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BeamDraw) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BeamCombineType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BeamType) |]))
|
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ module Dodge.Data.Block (
|
|||||||
module Dodge.Data.PathGraph,
|
module Dodge.Data.PathGraph,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -55,6 +52,3 @@ makeLenses ''Block
|
|||||||
deriveJSON defaultOptions ''Block
|
deriveJSON defaultOptions ''Block
|
||||||
deriveJSON defaultOptions ''BlockDraw
|
deriveJSON defaultOptions ''BlockDraw
|
||||||
deriveJSON defaultOptions ''BlSh
|
deriveJSON defaultOptions ''BlSh
|
||||||
$($(derive [d| instance Deriving (Store BlSh) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Block ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BlockDraw) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Bounds where
|
module Dodge.Data.Bounds where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -20,7 +17,6 @@ data Bounds = Bounds
|
|||||||
, _bdMaxY :: Float
|
, _bdMaxY :: Float
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Bounds ) |]))
|
|
||||||
|
|
||||||
defaultBounds :: Bounds
|
defaultBounds :: Bounds
|
||||||
defaultBounds = Bounds 0 0 0 0
|
defaultBounds = Bounds 0 0 0 0
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ module Dodge.Data.Bullet
|
|||||||
, module Dodge.Data.Damage
|
, module Dodge.Data.Damage
|
||||||
)where
|
)where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -65,9 +62,3 @@ deriveJSON defaultOptions ''BulletUpdateMod
|
|||||||
deriveJSON defaultOptions ''BulletEffect
|
deriveJSON defaultOptions ''BulletEffect
|
||||||
deriveJSON defaultOptions ''BulletSpawn
|
deriveJSON defaultOptions ''BulletSpawn
|
||||||
deriveJSON defaultOptions ''BulletTrajectory
|
deriveJSON defaultOptions ''BulletTrajectory
|
||||||
$($(derive [d| instance Deriving (Store Bullet ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store EnergyBallType ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BulletUpdateMod ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BulletEffect) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BulletTrajectory) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BulletSpawn ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Button where
|
module Dodge.Data.Button where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -74,7 +71,3 @@ deriveJSON defaultOptions ''ButtonDraw
|
|||||||
deriveJSON defaultOptions ''ButtonEvent
|
deriveJSON defaultOptions ''ButtonEvent
|
||||||
deriveJSON defaultOptions ''Button
|
deriveJSON defaultOptions ''Button
|
||||||
deriveJSON defaultOptions ''ButtonState
|
deriveJSON defaultOptions ''ButtonState
|
||||||
$($(derive [d| instance Deriving (Store ButtonDraw) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ButtonEvent) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Button ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ButtonState ) |]))
|
|
||||||
|
|||||||
@@ -48,11 +48,8 @@ module Dodge.Data.CWorld (
|
|||||||
module Dodge.Data.WorldEffect,
|
module Dodge.Data.WorldEffect,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp
|
--import LinearHelp
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -231,8 +228,3 @@ makeLenses ''WorldBeams
|
|||||||
makeLenses ''CWCam
|
makeLenses ''CWCam
|
||||||
makeLenses ''CWGen
|
makeLenses ''CWGen
|
||||||
makeLenses ''CWTime
|
makeLenses ''CWTime
|
||||||
$($(derive [d| instance Deriving (Store CWCam ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CWorld ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CWTime ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CWGen ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store WorldBeams ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.CamouflageStatus where
|
module Dodge.Data.CamouflageStatus where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -16,6 +13,5 @@ data CamouflageStatus
|
|||||||
= FullyVisible
|
= FullyVisible
|
||||||
| Invisible
|
| Invisible
|
||||||
deriving (Eq, Ord, Enum, Read, Show, Bounded, Generic, Flat)
|
deriving (Eq, Ord, Enum, Read, Show, Bounded, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CamouflageStatus) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''CamouflageStatus
|
deriveJSON defaultOptions ''CamouflageStatus
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Cloud where
|
module Dodge.Data.Cloud where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -40,6 +37,3 @@ makeLenses ''Cloud
|
|||||||
deriveJSON defaultOptions ''CloudDraw
|
deriveJSON defaultOptions ''CloudDraw
|
||||||
deriveJSON defaultOptions ''Cloud
|
deriveJSON defaultOptions ''Cloud
|
||||||
deriveJSON defaultOptions ''CloudType
|
deriveJSON defaultOptions ''CloudType
|
||||||
$($(derive [d| instance Deriving (Store CloudType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CloudDraw) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Cloud ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Corpse where
|
module Dodge.Data.Corpse where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -17,9 +14,7 @@ import Geometry.Data
|
|||||||
import ShapePicture.Data
|
import ShapePicture.Data
|
||||||
|
|
||||||
data CorpseResurrection = NoResurrection
|
data CorpseResurrection = NoResurrection
|
||||||
| HackCorpseResurrection
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CorpseResurrection ) |]))
|
|
||||||
|
|
||||||
data Corpse = Corpse
|
data Corpse = Corpse
|
||||||
{ _cpID :: Int
|
{ _cpID :: Int
|
||||||
@@ -29,7 +24,6 @@ data Corpse = Corpse
|
|||||||
, _cpRes :: CorpseResurrection
|
, _cpRes :: CorpseResurrection
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Corpse ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Corpse
|
makeLenses ''Corpse
|
||||||
deriveJSON defaultOptions ''CorpseResurrection
|
deriveJSON defaultOptions ''CorpseResurrection
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.CrGroupParams where
|
module Dodge.Data.CrGroupParams where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -25,11 +22,8 @@ data CrGroupParams = CrGroupParams
|
|||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data CrGroupUpdate = DefaultCrGroupUpdate
|
data CrGroupUpdate = DefaultCrGroupUpdate
|
||||||
| HackCrGroupUpdate
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
makeLenses ''CrGroupParams
|
makeLenses ''CrGroupParams
|
||||||
deriveJSON defaultOptions ''CrGroupParams
|
deriveJSON defaultOptions ''CrGroupParams
|
||||||
deriveJSON defaultOptions ''CrGroupUpdate
|
deriveJSON defaultOptions ''CrGroupUpdate
|
||||||
$($(derive [d| instance Deriving (Store CrGroupParams ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CrGroupUpdate ) |]))
|
|
||||||
|
|||||||
@@ -5,19 +5,13 @@
|
|||||||
|
|
||||||
module Dodge.Data.CrWlID where
|
module Dodge.Data.CrWlID where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
|
|
||||||
data CrWlID = CrID Int | WlID Int | NothingID -- TODO rewrite/remove this
|
data CrWlID = CrID Int | WlID Int | NothingID -- TODO rewrite/remove this
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrWlID ) |]))
|
|
||||||
|
|
||||||
makeLenses ''CrWlID
|
makeLenses ''CrWlID
|
||||||
deriveJSON defaultOptions ''CrWlID
|
deriveJSON defaultOptions ''CrWlID
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ module Dodge.Data.Creature (
|
|||||||
module Dodge.Data.Hammer,
|
module Dodge.Data.Hammer,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -81,7 +78,6 @@ data Creature = Creature
|
|||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data CreatureCorpse = MakeDefaultCorpse
|
data CreatureCorpse = MakeDefaultCorpse
|
||||||
| HackCreatureCorpse
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data Intention = Intention
|
data Intention = Intention
|
||||||
@@ -99,6 +95,3 @@ makeLenses ''Intention
|
|||||||
deriveJSON defaultOptions ''Creature
|
deriveJSON defaultOptions ''Creature
|
||||||
deriveJSON defaultOptions ''CreatureCorpse
|
deriveJSON defaultOptions ''CreatureCorpse
|
||||||
deriveJSON defaultOptions ''Intention
|
deriveJSON defaultOptions ''Intention
|
||||||
$($(derive [d| instance Deriving (Store Intention ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Creature ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CreatureCorpse ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Creature.Memory where
|
module Dodge.Data.Creature.Memory where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -20,7 +17,6 @@ data Memory = Memory
|
|||||||
, _nodesSearched :: [Int]
|
, _nodesSearched :: [Int]
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Memory ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Memory
|
makeLenses ''Memory
|
||||||
deriveJSON defaultOptions ''Memory
|
deriveJSON defaultOptions ''Memory
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ module Dodge.Data.Creature.Misc (
|
|||||||
module Dodge.Data.CamouflageStatus,
|
module Dodge.Data.CamouflageStatus,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -90,9 +87,3 @@ deriveJSON defaultOptions ''CrMvType
|
|||||||
deriveJSON defaultOptions ''HumanoidAI
|
deriveJSON defaultOptions ''HumanoidAI
|
||||||
deriveJSON defaultOptions ''CreatureType
|
deriveJSON defaultOptions ''CreatureType
|
||||||
deriveJSON defaultOptions ''BarrelType
|
deriveJSON defaultOptions ''BarrelType
|
||||||
$($(derive [d| instance Deriving (Store CrMvType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store HumanoidAI) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CreatureType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BarrelType ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CreatureStatistics ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Vocalization) |]))
|
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ module Dodge.Data.Creature.Perception (
|
|||||||
auDist,
|
auDist,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -70,7 +67,6 @@ data Awareness
|
|||||||
= Suspicious Float
|
= Suspicious Float
|
||||||
| Cognizant Float
|
| Cognizant Float
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Awareness) |]))
|
|
||||||
|
|
||||||
makeLenses ''Perception
|
makeLenses ''Perception
|
||||||
makeLenses ''Vision
|
makeLenses ''Vision
|
||||||
@@ -82,8 +78,3 @@ deriveJSON defaultOptions ''Audition
|
|||||||
deriveJSON defaultOptions ''Vigilance
|
deriveJSON defaultOptions ''Vigilance
|
||||||
deriveJSON defaultOptions ''Attention
|
deriveJSON defaultOptions ''Attention
|
||||||
deriveJSON defaultOptions ''Awareness
|
deriveJSON defaultOptions ''Awareness
|
||||||
$($(derive [d| instance Deriving (Store Perception ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Vision ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Audition ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Vigilance) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Attention) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Creature.Stance where
|
module Dodge.Data.Creature.Stance where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -44,7 +41,6 @@ data Posture
|
|||||||
= Aiming
|
= Aiming
|
||||||
| AtEase
|
| AtEase
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Posture) |]))
|
|
||||||
|
|
||||||
makeLenses ''Stance
|
makeLenses ''Stance
|
||||||
makeLenses ''Carriage
|
makeLenses ''Carriage
|
||||||
@@ -53,6 +49,3 @@ deriveJSON defaultOptions ''Stance
|
|||||||
deriveJSON defaultOptions ''Carriage
|
deriveJSON defaultOptions ''Carriage
|
||||||
deriveJSON defaultOptions ''FootForward
|
deriveJSON defaultOptions ''FootForward
|
||||||
deriveJSON defaultOptions ''Posture
|
deriveJSON defaultOptions ''Posture
|
||||||
$($(derive [d| instance Deriving (Store Stance ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Carriage) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store FootForward) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Creature.State where
|
module Dodge.Data.Creature.State where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -64,8 +61,3 @@ deriveJSON defaultOptions ''CreatureDropType
|
|||||||
deriveJSON defaultOptions ''CrSpState
|
deriveJSON defaultOptions ''CrSpState
|
||||||
deriveJSON defaultOptions ''Faction
|
deriveJSON defaultOptions ''Faction
|
||||||
deriveJSON defaultOptions ''CrGroup
|
deriveJSON defaultOptions ''CrGroup
|
||||||
$($(derive [d| instance Deriving (Store CreatureState ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CreatureDropType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CrSpState) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Faction) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CrGroup) |]))
|
|
||||||
|
|||||||
@@ -5,40 +5,28 @@
|
|||||||
|
|
||||||
module Dodge.Data.CreatureEffect where
|
module Dodge.Data.CreatureEffect where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
|
|
||||||
data WdCrCr = NoCreatureEffect
|
data WdCrCr = NoCreatureEffect
|
||||||
| HackWdCrCr
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data CrWdImp = NoCrWdImp
|
data CrWdImp = NoCrWdImp
|
||||||
| HackCrWdImp
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrWdImp ) |]))
|
|
||||||
|
|
||||||
data CrWdWd = CrWdWdId
|
data CrWdWd = CrWdWdId
|
||||||
| HackCrWdWd
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrWdWd ) |]))
|
|
||||||
|
|
||||||
data IntImp = NoIntImp
|
data IntImp = NoIntImp
|
||||||
| HackNoIntImp
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store IntImp ) |]))
|
|
||||||
|
|
||||||
data CrImp
|
data CrImp
|
||||||
= NoCrImp
|
= NoCrImp
|
||||||
| TurnTowardCr Float -- turn amount
|
| TurnTowardCr Float -- turn amount
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrImp) |]))
|
|
||||||
|
|
||||||
data P2Imp = P2ImpNo
|
data P2Imp = P2ImpNo
|
||||||
| HackP2ImpNo
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data WdCrBl
|
data WdCrBl
|
||||||
@@ -55,35 +43,26 @@ data CrBl
|
|||||||
| CrIsAiming
|
| CrIsAiming
|
||||||
| CrIsAnimate
|
| CrIsAnimate
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrBl) |]))
|
|
||||||
|
|
||||||
data MCrAc = MCrNoAction
|
data MCrAc = MCrNoAction
|
||||||
| HackMCrAc
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store MCrAc ) |]))
|
|
||||||
|
|
||||||
data CrAc
|
data CrAc
|
||||||
= CrTurnAround
|
= CrTurnAround
|
||||||
| CrFleeFromTarget
|
| CrFleeFromTarget
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrAc) |]))
|
|
||||||
|
|
||||||
data P2Ac = P2NoAction
|
data P2Ac = P2NoAction
|
||||||
| HackP2Ac
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store P2Ac ) |]))
|
|
||||||
|
|
||||||
data MP2Ac = MP2NoAction
|
data MP2Ac = MP2NoAction
|
||||||
| HackMP2Ac
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store MP2Ac ) |]))
|
|
||||||
|
|
||||||
data CrWdAc
|
data CrWdAc
|
||||||
= CrWdBFSThenReturn Int
|
= CrWdBFSThenReturn Int
|
||||||
| ChooseMovementSpreadGun
|
| ChooseMovementSpreadGun
|
||||||
| ChooseMovementLtAuto
|
| ChooseMovementLtAuto
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CrWdAc) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''WdCrCr
|
deriveJSON defaultOptions ''WdCrCr
|
||||||
deriveJSON defaultOptions ''CrWdImp
|
deriveJSON defaultOptions ''CrWdImp
|
||||||
@@ -98,6 +77,3 @@ deriveJSON defaultOptions ''CrAc
|
|||||||
deriveJSON defaultOptions ''P2Ac
|
deriveJSON defaultOptions ''P2Ac
|
||||||
deriveJSON defaultOptions ''MP2Ac
|
deriveJSON defaultOptions ''MP2Ac
|
||||||
deriveJSON defaultOptions ''CrWdAc
|
deriveJSON defaultOptions ''CrWdAc
|
||||||
$($(derive [d| instance Deriving (Store P2Imp ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store WdCrBl) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store WdCrCr ) |]))
|
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ module Dodge.Data.Damage (
|
|||||||
module Dodge.Data.Damage.Type,
|
module Dodge.Data.Damage.Type,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -33,7 +30,6 @@ data DamageEffect
|
|||||||
| PushBackDamage {_dePushBack :: Float}
|
| PushBackDamage {_dePushBack :: Float}
|
||||||
| NoDamageEffect
|
| NoDamageEffect
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store DamageEffect) |]))
|
|
||||||
|
|
||||||
data Damage = Damage
|
data Damage = Damage
|
||||||
{ _dmType :: DamageType
|
{ _dmType :: DamageType
|
||||||
@@ -44,7 +40,6 @@ data Damage = Damage
|
|||||||
, _dmEffect :: DamageEffect
|
, _dmEffect :: DamageEffect
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Damage ) |]))
|
|
||||||
|
|
||||||
isElectrical :: Damage -> Bool
|
isElectrical :: Damage -> Bool
|
||||||
isElectrical dm = case _dmType dm of
|
isElectrical dm = case _dmType dm of
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Damage.Type where
|
module Dodge.Data.Damage.Type where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -29,7 +26,6 @@ data DamageType
|
|||||||
| POISONDAM
|
| POISONDAM
|
||||||
| ENTERREMENT
|
| ENTERREMENT
|
||||||
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store DamageType) |]))
|
|
||||||
|
|
||||||
instance ToJSONKey DamageType
|
instance ToJSONKey DamageType
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Distortion where
|
module Dodge.Data.Distortion where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Geometry
|
import Geometry
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
@@ -17,6 +14,5 @@ import Data.Aeson.TH
|
|||||||
data Distortion
|
data Distortion
|
||||||
= RadialDistortion Point2 Point2 Point2 Float
|
= RadialDistortion Point2 Point2 Point2 Float
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Distortion) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''Distortion
|
deriveJSON defaultOptions ''Distortion
|
||||||
|
|||||||
@@ -10,9 +10,6 @@ module Dodge.Data.Door (
|
|||||||
module Dodge.Data.WorldEffect,
|
module Dodge.Data.WorldEffect,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -26,14 +23,12 @@ import Geometry.Data
|
|||||||
|
|
||||||
data DoorStatus = DoorOpen | DoorClosed | DoorHalfway | DoorInt Int
|
data DoorStatus = DoorOpen | DoorClosed | DoorHalfway | DoorInt Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store DoorStatus ) |]))
|
|
||||||
|
|
||||||
data PushSource
|
data PushSource
|
||||||
= PushesItself
|
= PushesItself
|
||||||
| PushedBy Int
|
| PushedBy Int
|
||||||
| NotPushed
|
| NotPushed
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store PushSource) |]))
|
|
||||||
|
|
||||||
data Door = Door
|
data Door = Door
|
||||||
{ _drID :: Int
|
{ _drID :: Int
|
||||||
@@ -54,7 +49,6 @@ data Door = Door
|
|||||||
, _drObstacleType :: EdgeObstacle
|
, _drObstacleType :: EdgeObstacle
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Door ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Door
|
makeLenses ''Door
|
||||||
deriveJSON defaultOptions ''DoorStatus
|
deriveJSON defaultOptions ''DoorStatus
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.EnergyBall where
|
module Dodge.Data.EnergyBall where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -27,7 +24,6 @@ data EnergyBall = EnergyBall
|
|||||||
, _ebRot :: Float
|
, _ebRot :: Float
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store EnergyBall ) |]))
|
|
||||||
|
|
||||||
makeLenses ''EnergyBall
|
makeLenses ''EnergyBall
|
||||||
deriveJSON defaultOptions ''EnergyBall
|
deriveJSON defaultOptions ''EnergyBall
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Equipment.Misc where
|
module Dodge.Data.Equipment.Misc where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -20,7 +17,6 @@ data EquipSite
|
|||||||
| GoesOnLegs
|
| GoesOnLegs
|
||||||
| GoesOnSpecial
|
| GoesOnSpecial
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store EquipSite) |]))
|
|
||||||
|
|
||||||
data EquipPosition
|
data EquipPosition
|
||||||
= OnHead
|
= OnHead
|
||||||
@@ -31,7 +27,6 @@ data EquipPosition
|
|||||||
| OnLegs
|
| OnLegs
|
||||||
| OnSpecial
|
| OnSpecial
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store EquipPosition) |]))
|
|
||||||
|
|
||||||
instance ToJSONKey EquipPosition
|
instance ToJSONKey EquipPosition
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Flame where
|
module Dodge.Data.Flame where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -25,7 +22,6 @@ data Flame = Flame
|
|||||||
, _flOriginalVel :: Point2
|
, _flOriginalVel :: Point2
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Flame ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Flame
|
makeLenses ''Flame
|
||||||
deriveJSON defaultOptions ''Flame
|
deriveJSON defaultOptions ''Flame
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Flare where
|
module Dodge.Data.Flare where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -30,7 +27,6 @@ data Flare
|
|||||||
, _flareTime :: Int
|
, _flareTime :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Flare) |]))
|
|
||||||
|
|
||||||
makeLenses ''Flare
|
makeLenses ''Flare
|
||||||
deriveJSON defaultOptions ''Flare
|
deriveJSON defaultOptions ''Flare
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.FloatFunction where
|
module Dodge.Data.FloatFunction where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -19,6 +16,5 @@ data FloatFloat
|
|||||||
| FloatAbsCheckGreaterLess Float Float Float
|
| FloatAbsCheckGreaterLess Float Float Float
|
||||||
| FloatConst Float
|
| FloatConst Float
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store FloatFloat) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''FloatFloat
|
deriveJSON defaultOptions ''FloatFloat
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.FloorItem where
|
module Dodge.Data.FloorItem where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -18,7 +15,6 @@ import Geometry.Data
|
|||||||
|
|
||||||
data FloorItem = FlIt {_flIt :: Item, _flItPos :: Point2, _flItRot :: Float, _flItID :: Int}
|
data FloorItem = FlIt {_flIt :: Item, _flItPos :: Point2, _flItRot :: Float, _flItID :: Int}
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store FloorItem ) |]))
|
|
||||||
|
|
||||||
makeLenses ''FloorItem
|
makeLenses ''FloorItem
|
||||||
deriveJSON defaultOptions ''FloorItem
|
deriveJSON defaultOptions ''FloorItem
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.ForegroundShape where
|
module Dodge.Data.ForegroundShape where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -24,7 +21,6 @@ data ForegroundShape = ForegroundShape
|
|||||||
, _fsSPic :: SPic
|
, _fsSPic :: SPic
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ForegroundShape ) |]))
|
|
||||||
|
|
||||||
makeLenses ''ForegroundShape
|
makeLenses ''ForegroundShape
|
||||||
deriveJSON defaultOptions ''ForegroundShape
|
deriveJSON defaultOptions ''ForegroundShape
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.GenParams where
|
module Dodge.Data.GenParams where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -27,5 +24,3 @@ data DecorationShape = PLUS | SQUARE | CIRCLE | THREELINES
|
|||||||
makeLenses ''GenParams
|
makeLenses ''GenParams
|
||||||
deriveJSON defaultOptions ''GenParams
|
deriveJSON defaultOptions ''GenParams
|
||||||
deriveJSON defaultOptions ''DecorationShape
|
deriveJSON defaultOptions ''DecorationShape
|
||||||
$($(derive [d| instance Deriving (Store GenParams ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store DecorationShape ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Gust where
|
module Dodge.Data.Gust where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -22,7 +19,6 @@ data Gust = Gust
|
|||||||
, _guTime :: Int
|
, _guTime :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Gust ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Gust
|
makeLenses ''Gust
|
||||||
deriveJSON defaultOptions ''Gust
|
deriveJSON defaultOptions ''Gust
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.HUD where
|
module Dodge.Data.HUD where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -28,7 +25,6 @@ data SubInventory
|
|||||||
| LockedInventory
|
| LockedInventory
|
||||||
| DisplayTerminal {_termID :: Int}
|
| DisplayTerminal {_termID :: Int}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store SubInventory) |]))
|
|
||||||
|
|
||||||
data HUD = HUD
|
data HUD = HUD
|
||||||
{ _hudElement :: HUDElement
|
{ _hudElement :: HUDElement
|
||||||
@@ -37,7 +33,6 @@ data HUD = HUD
|
|||||||
, _carteRot :: Float
|
, _carteRot :: Float
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store HUD ) |]))
|
|
||||||
|
|
||||||
makeLenses ''HUD
|
makeLenses ''HUD
|
||||||
makeLenses ''HUDElement
|
makeLenses ''HUDElement
|
||||||
@@ -45,4 +40,3 @@ makeLenses ''SubInventory
|
|||||||
deriveJSON defaultOptions ''HUDElement
|
deriveJSON defaultOptions ''HUDElement
|
||||||
deriveJSON defaultOptions ''SubInventory
|
deriveJSON defaultOptions ''SubInventory
|
||||||
deriveJSON defaultOptions ''HUD
|
deriveJSON defaultOptions ''HUD
|
||||||
$($(derive [d| instance Deriving (Store HUDElement) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Hammer where
|
module Dodge.Data.Hammer where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -23,9 +20,7 @@ data HammerPosition
|
|||||||
| HammerReleased
|
| HammerReleased
|
||||||
| HammerUp
|
| HammerUp
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store HammerPosition) |]))
|
|
||||||
|
|
||||||
makeLenses ''HammerType
|
makeLenses ''HammerType
|
||||||
deriveJSON defaultOptions ''HammerType
|
deriveJSON defaultOptions ''HammerType
|
||||||
deriveJSON defaultOptions ''HammerPosition
|
deriveJSON defaultOptions ''HammerPosition
|
||||||
$($(derive [d| instance Deriving (Store HammerType) |]))
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE DeriveAnyClass #-}
|
{-# LANGUAGE DeriveAnyClass #-}
|
||||||
{-# LANGUAGE StrictData #-}
|
--{-# LANGUAGE StrictData #-}
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
|
||||||
module Dodge.Data.Item (
|
module Dodge.Data.Item (
|
||||||
@@ -17,9 +17,6 @@ module Dodge.Data.Item (
|
|||||||
module Dodge.Data.Item.Location,
|
module Dodge.Data.Item.Location,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -54,7 +51,6 @@ data Item = Item
|
|||||||
, _itParams :: ItemParams
|
, _itParams :: ItemParams
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Item ) |]))
|
|
||||||
|
|
||||||
_itUseAimStance :: Item -> AimStance
|
_itUseAimStance :: Item -> AimStance
|
||||||
_itUseAimStance = _aimStance . _heldAim . _itUse
|
_itUseAimStance = _aimStance . _heldAim . _itUse
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Combine where
|
module Dodge.Data.Item.Combine where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -225,14 +222,3 @@ deriveJSON defaultOptions ''ModuleSlot
|
|||||||
makeLenses ''ItemType
|
makeLenses ''ItemType
|
||||||
makeLenses ''ItemBaseType
|
makeLenses ''ItemBaseType
|
||||||
makeLenses ''HeldItemType
|
makeLenses ''HeldItemType
|
||||||
$($(derive [d| instance Deriving (Store ItemType ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Stack ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CraftType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItemBaseType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ConsumableItemType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store EquipItemType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store LeftItemType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store HeldItemType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItemModuleType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Detector) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ModuleSlot) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.CurseStatus where
|
module Dodge.Data.Item.CurseStatus where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -17,6 +14,5 @@ data CurseStatus
|
|||||||
| UndroppableIdentified
|
| UndroppableIdentified
|
||||||
| UndroppableUnidentified
|
| UndroppableUnidentified
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store CurseStatus) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''CurseStatus
|
deriveJSON defaultOptions ''CurseStatus
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Effect where
|
module Dodge.Data.Item.Effect where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -31,14 +28,11 @@ data ItInvEffect
|
|||||||
| RemoveShieldWall
|
| RemoveShieldWall
|
||||||
| EffectWhileHeld ItInvEffect
|
| EffectWhileHeld ItInvEffect
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ItInvEffect) |]))
|
|
||||||
|
|
||||||
data ItFloorEffect = NoFloorEffect
|
data ItFloorEffect = NoFloorEffect
|
||||||
| HackItFloorEffect
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data ItDropEffect = NoDropEffect
|
data ItDropEffect = NoDropEffect
|
||||||
| HackItDropEffect
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
makeLenses ''ItEffect
|
makeLenses ''ItEffect
|
||||||
@@ -46,6 +40,3 @@ deriveJSON defaultOptions ''ItEffect
|
|||||||
deriveJSON defaultOptions ''ItInvEffect
|
deriveJSON defaultOptions ''ItInvEffect
|
||||||
deriveJSON defaultOptions ''ItFloorEffect
|
deriveJSON defaultOptions ''ItFloorEffect
|
||||||
deriveJSON defaultOptions ''ItDropEffect
|
deriveJSON defaultOptions ''ItDropEffect
|
||||||
$($(derive [d| instance Deriving (Store ItEffect ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItDropEffect ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItFloorEffect ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.HeldDelay where
|
module Dodge.Data.Item.HeldDelay where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -30,7 +27,6 @@ data UseDelay -- should just be Delay
|
|||||||
, _warmMax :: Int
|
, _warmMax :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store UseDelay ) |]))
|
|
||||||
|
|
||||||
makeLenses ''UseDelay
|
makeLenses ''UseDelay
|
||||||
deriveJSON defaultOptions ''UseDelay
|
deriveJSON defaultOptions ''UseDelay
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.HeldScroll where
|
module Dodge.Data.Item.HeldScroll where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -24,7 +21,6 @@ data HeldScroll
|
|||||||
, _hsMaxInt :: Int
|
, _hsMaxInt :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store HeldScroll) |]))
|
|
||||||
|
|
||||||
makeLenses ''HeldScroll
|
makeLenses ''HeldScroll
|
||||||
deriveJSON defaultOptions ''HeldScroll
|
deriveJSON defaultOptions ''HeldScroll
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.HeldUse where
|
module Dodge.Data.Item.HeldUse where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -31,13 +28,11 @@ data HeldUse
|
|||||||
| HeldForceField
|
| HeldForceField
|
||||||
| HeldShatter
|
| HeldShatter
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store HeldUse) |]))
|
|
||||||
|
|
||||||
data Cuse
|
data Cuse
|
||||||
= CDoNothing
|
= CDoNothing
|
||||||
| CHeal Int
|
| CHeal Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Cuse) |]))
|
|
||||||
|
|
||||||
data Euse
|
data Euse
|
||||||
= EDoNothing
|
= EDoNothing
|
||||||
@@ -49,7 +44,6 @@ data Euse
|
|||||||
| EonWristShield
|
| EonWristShield
|
||||||
| EoffWristShield
|
| EoffWristShield
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Euse) |]))
|
|
||||||
|
|
||||||
data Luse
|
data Luse
|
||||||
= LDoNothing
|
= LDoNothing
|
||||||
@@ -59,7 +53,6 @@ data Luse
|
|||||||
| LUnsafeBlink
|
| LUnsafeBlink
|
||||||
| LBoost
|
| LBoost
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Luse) |]))
|
|
||||||
|
|
||||||
data HeldMod
|
data HeldMod
|
||||||
= HeldModNothing
|
= HeldModNothing
|
||||||
@@ -98,7 +91,6 @@ data HeldMod
|
|||||||
| RevolverXRepeatMod
|
| RevolverXRepeatMod
|
||||||
| BangConeMod
|
| BangConeMod
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store HeldMod) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''Cuse
|
deriveJSON defaultOptions ''Cuse
|
||||||
deriveJSON defaultOptions ''HeldMod
|
deriveJSON defaultOptions ''HeldMod
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
module Dodge.Data.Item.Location where
|
module Dodge.Data.Item.Location where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -18,7 +15,6 @@ data ItemLocation
|
|||||||
| OnFloor {_ipFlID :: Int}
|
| OnFloor {_ipFlID :: Int}
|
||||||
| InVoid
|
| InVoid
|
||||||
deriving (Eq, Show, Read, Ord, Generic, Flat)
|
deriving (Eq, Show, Read, Ord, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ItemLocation) |]))
|
|
||||||
|
|
||||||
makeLenses ''ItemLocation
|
makeLenses ''ItemLocation
|
||||||
deriveJSON defaultOptions ''ItemLocation
|
deriveJSON defaultOptions ''ItemLocation
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Misc where
|
module Dodge.Data.Item.Misc where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -21,7 +18,6 @@ data ItemDimension = ItemDimension
|
|||||||
, _dimAttachPos :: Point3
|
, _dimAttachPos :: Point3
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ItemDimension ) |]))
|
|
||||||
|
|
||||||
data ItemPortage
|
data ItemPortage
|
||||||
= HeldItem
|
= HeldItem
|
||||||
@@ -31,18 +27,15 @@ data ItemPortage
|
|||||||
| WornItem
|
| WornItem
|
||||||
| NoPortage
|
| NoPortage
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ItemPortage) |]))
|
|
||||||
|
|
||||||
--data ItemValue = ItemValue
|
--data ItemValue = ItemValue
|
||||||
-- { _ivInt :: Int
|
-- { _ivInt :: Int
|
||||||
-- , _ivType :: ItemValueType
|
-- , _ivType :: ItemValueType
|
||||||
-- }
|
-- }
|
||||||
-- deriving (Eq, Show, Read, Generic, Flat)
|
-- deriving (Eq, Show, Read, Generic, Flat)
|
||||||
-- $($(derive [d| instance Deriving (Store ItemValue ) |]))
|
|
||||||
--
|
--
|
||||||
--data ItemValueType = MundaneItem | ArtefactItem
|
--data ItemValueType = MundaneItem | ArtefactItem
|
||||||
-- deriving (Eq, Show, Read, Generic, Flat)
|
-- deriving (Eq, Show, Read, Generic, Flat)
|
||||||
-- $($(derive [d| instance Deriving (Store ItemValueType ) |]))
|
|
||||||
|
|
||||||
makeLenses ''ItemDimension
|
makeLenses ''ItemDimension
|
||||||
makeLenses ''ItemPortage
|
makeLenses ''ItemPortage
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Params where
|
module Dodge.Data.Item.Params where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -119,9 +116,3 @@ deriveJSON defaultOptions ''PreviousArcEffect
|
|||||||
deriveJSON defaultOptions ''GunBarrels
|
deriveJSON defaultOptions ''GunBarrels
|
||||||
deriveJSON defaultOptions ''Nozzle
|
deriveJSON defaultOptions ''Nozzle
|
||||||
deriveJSON defaultOptions ''BarrelSpread
|
deriveJSON defaultOptions ''BarrelSpread
|
||||||
$($(derive [d| instance Deriving (Store PreviousArcEffect ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store GunBarrels) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Nozzle ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store BarrelSpread) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItemParams) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ShrinkGunStatus ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Scope where
|
module Dodge.Data.Item.Scope where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -34,7 +31,6 @@ data Scope
|
|||||||
_scopeIsCamera :: Bool
|
_scopeIsCamera :: Bool
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Scope) |]))
|
|
||||||
|
|
||||||
makeLenses ''Scope
|
makeLenses ''Scope
|
||||||
deriveJSON defaultOptions ''Scope
|
deriveJSON defaultOptions ''Scope
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Targeting where
|
module Dodge.Data.Item.Targeting where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -45,6 +42,3 @@ makeLenses ''Targeting
|
|||||||
deriveJSON defaultOptions ''Targeting
|
deriveJSON defaultOptions ''Targeting
|
||||||
deriveJSON defaultOptions ''TargetUpdate
|
deriveJSON defaultOptions ''TargetUpdate
|
||||||
deriveJSON defaultOptions ''TargetDraw
|
deriveJSON defaultOptions ''TargetDraw
|
||||||
$($(derive [d| instance Deriving (Store Targeting) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TargetDraw) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TargetUpdate) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Tweak where
|
module Dodge.Data.Item.Tweak where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -35,12 +32,9 @@ data TweakParam = TweakParam
|
|||||||
, _tweakMax :: Int
|
, _tweakMax :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TweakParam ) |]))
|
|
||||||
|
|
||||||
makeLenses ''TweakParam
|
makeLenses ''TweakParam
|
||||||
makeLenses ''ItemTweaks
|
makeLenses ''ItemTweaks
|
||||||
deriveJSON defaultOptions ''ItemTweaks
|
deriveJSON defaultOptions ''ItemTweaks
|
||||||
deriveJSON defaultOptions ''TweakType
|
deriveJSON defaultOptions ''TweakType
|
||||||
deriveJSON defaultOptions ''TweakParam
|
deriveJSON defaultOptions ''TweakParam
|
||||||
$($(derive [d| instance Deriving (Store ItemTweaks) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TweakType) |]))
|
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ module Dodge.Data.Item.Use (
|
|||||||
module Dodge.Data.Hammer,
|
module Dodge.Data.Hammer,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -86,7 +83,3 @@ deriveJSON defaultOptions ''ItemUse
|
|||||||
deriveJSON defaultOptions ''AimParams
|
deriveJSON defaultOptions ''AimParams
|
||||||
deriveJSON defaultOptions ''AimStance
|
deriveJSON defaultOptions ''AimStance
|
||||||
deriveJSON defaultOptions ''ItZoom
|
deriveJSON defaultOptions ''ItZoom
|
||||||
$($(derive [d| instance Deriving (Store AimParams ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store AimStance) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItZoom ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ItemUse) |]))
|
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ module Dodge.Data.Item.Use.Consumption (
|
|||||||
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
module Dodge.Data.Item.Use.Consumption.LoadAction,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -32,7 +29,6 @@ data HeldConsumption
|
|||||||
}
|
}
|
||||||
| NoConsumption
|
| NoConsumption
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store HeldConsumption) |]))
|
|
||||||
|
|
||||||
data LeftConsumption
|
data LeftConsumption
|
||||||
= AutoRecharging
|
= AutoRecharging
|
||||||
@@ -46,14 +42,12 @@ data LeftConsumption
|
|||||||
, _wpCharge :: Int
|
, _wpCharge :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Show, Read, Generic, Flat)
|
deriving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LeftConsumption) |]))
|
|
||||||
|
|
||||||
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
newtype ItAmount = ItAmount {_getItAmount :: Int}
|
||||||
-- deriving (Eq, Ord, Read, Show, Num, Real, Generic, Flat)
|
-- deriving (Eq, Ord, Read, Show, Num, Real, Generic, Flat)
|
||||||
deriving newtype (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
deriving newtype (Eq, Ord, Read, Show, Num, Real, Enum, Integral)
|
||||||
deriving stock (Generic)
|
deriving stock (Generic)
|
||||||
deriving anyclass (Flat)
|
deriving anyclass (Flat)
|
||||||
$($(derive [d| instance Deriving (Store ItAmount) |]))
|
|
||||||
|
|
||||||
makeLenses ''HeldConsumption
|
makeLenses ''HeldConsumption
|
||||||
makeLenses ''LeftConsumption
|
makeLenses ''LeftConsumption
|
||||||
|
|||||||
@@ -9,9 +9,6 @@ module Dodge.Data.Item.Use.Consumption.Ammo (
|
|||||||
module Dodge.Data.Payload,
|
module Dodge.Data.Payload,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -62,7 +59,6 @@ data AmmoType
|
|||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data ForceFieldType = DefaultForceField
|
data ForceFieldType = DefaultForceField
|
||||||
| HackForceFieldType
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data GasCreate = CreatePoisonGas | CreateFlame
|
data GasCreate = CreatePoisonGas | CreateFlame
|
||||||
@@ -76,9 +72,3 @@ deriveJSON defaultOptions ''ProjectileUpdate
|
|||||||
deriveJSON defaultOptions ''AmmoType
|
deriveJSON defaultOptions ''AmmoType
|
||||||
deriveJSON defaultOptions ''GasCreate
|
deriveJSON defaultOptions ''GasCreate
|
||||||
deriveJSON defaultOptions ''ForceFieldType
|
deriveJSON defaultOptions ''ForceFieldType
|
||||||
$($(derive [d| instance Deriving (Store AmmoType) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ProjectileDraw ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ProjectileCreate ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ProjectileUpdate) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ForceFieldType ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store GasCreate ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Item.Use.Consumption.LoadAction where
|
module Dodge.Data.Item.Use.Consumption.LoadAction where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -36,6 +33,3 @@ makeLenses ''InvSelAction
|
|||||||
deriveJSON defaultOptions ''LoadAction
|
deriveJSON defaultOptions ''LoadAction
|
||||||
deriveJSON defaultOptions ''InvSel
|
deriveJSON defaultOptions ''InvSel
|
||||||
deriveJSON defaultOptions ''InvSelAction
|
deriveJSON defaultOptions ''InvSelAction
|
||||||
$($(derive [d| instance Deriving (Store LoadAction) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store InvSelAction) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store InvSel ) |]))
|
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ module Dodge.Data.Item.Use.Equipment (
|
|||||||
module Dodge.Data.Item.Use.Equipment,
|
module Dodge.Data.Item.Use.Equipment,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -38,5 +35,3 @@ makeLenses ''EquipEffect
|
|||||||
makeLenses ''EquipParams
|
makeLenses ''EquipParams
|
||||||
deriveJSON defaultOptions ''EquipEffect
|
deriveJSON defaultOptions ''EquipEffect
|
||||||
deriveJSON defaultOptions ''EquipParams
|
deriveJSON defaultOptions ''EquipParams
|
||||||
$($(derive [d| instance Deriving (Store EquipEffect ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store EquipParams) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Laser where
|
module Dodge.Data.Laser where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -19,7 +16,6 @@ data LaserType
|
|||||||
= DamageLaser {_laserTypeDamage :: Int}
|
= DamageLaser {_laserTypeDamage :: Int}
|
||||||
| TargetLaser
|
| TargetLaser
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LaserType) |]))
|
|
||||||
|
|
||||||
data LaserStart = LaserStart
|
data LaserStart = LaserStart
|
||||||
{ _lpPhaseV :: Float
|
{ _lpPhaseV :: Float
|
||||||
@@ -29,7 +25,6 @@ data LaserStart = LaserStart
|
|||||||
, _lpType :: LaserType
|
, _lpType :: LaserType
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LaserStart ) |]))
|
|
||||||
|
|
||||||
data Laser = Laser
|
data Laser = Laser
|
||||||
{ _laColor :: Color
|
{ _laColor :: Color
|
||||||
@@ -37,7 +32,6 @@ data Laser = Laser
|
|||||||
, _laType :: LaserType
|
, _laType :: LaserType
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Laser ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Laser
|
makeLenses ''Laser
|
||||||
makeLenses ''LaserStart
|
makeLenses ''LaserStart
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.LightSource where
|
module Dodge.Data.LightSource where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -16,22 +13,18 @@ import Data.Aeson.TH
|
|||||||
import Geometry
|
import Geometry
|
||||||
|
|
||||||
data LightSourceDraw = DefaultLightSourceDraw
|
data LightSourceDraw = DefaultLightSourceDraw
|
||||||
| HackLightSourceDraw
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LightSourceDraw ) |]))
|
|
||||||
|
|
||||||
data TLSIntensity
|
data TLSIntensity
|
||||||
= ConstantIntensity
|
= ConstantIntensity
|
||||||
| TLSFade Point3 Int
|
| TLSFade Point3 Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TLSIntensity) |]))
|
|
||||||
|
|
||||||
data TLSUpdate
|
data TLSUpdate
|
||||||
= DestroyTLS
|
= DestroyTLS
|
||||||
| TimerTLS
|
| TimerTLS
|
||||||
| IntensityTLS TLSIntensity
|
| IntensityTLS TLSIntensity
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TLSUpdate) |]))
|
|
||||||
|
|
||||||
data LSParam = LSParam
|
data LSParam = LSParam
|
||||||
{ _lsPos :: !Point3
|
{ _lsPos :: !Point3
|
||||||
@@ -39,7 +32,6 @@ data LSParam = LSParam
|
|||||||
, _lsCol :: !Point3
|
, _lsCol :: !Point3
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LSParam ) |]))
|
|
||||||
|
|
||||||
data LightSource = LS
|
data LightSource = LS
|
||||||
{ _lsID :: Int
|
{ _lsID :: Int
|
||||||
@@ -48,7 +40,6 @@ data LightSource = LS
|
|||||||
, _lsPict :: LightSourceDraw --LightSource -> Picture
|
, _lsPict :: LightSourceDraw --LightSource -> Picture
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LightSource ) |]))
|
|
||||||
|
|
||||||
data TempLightSource = TLS
|
data TempLightSource = TLS
|
||||||
{ _tlsParam :: LSParam
|
{ _tlsParam :: LSParam
|
||||||
@@ -56,7 +47,6 @@ data TempLightSource = TLS
|
|||||||
, _tlsTime :: Int
|
, _tlsTime :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TempLightSource ) |]))
|
|
||||||
|
|
||||||
makeLenses ''LSParam
|
makeLenses ''LSParam
|
||||||
makeLenses ''LightSource
|
makeLenses ''LightSource
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.LinearShockwave where
|
module Dodge.Data.LinearShockwave where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -22,7 +19,6 @@ data LinearShockwave = LinearShockwave
|
|||||||
, _lwTimer :: Int
|
, _lwTimer :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store LinearShockwave ) |]))
|
|
||||||
|
|
||||||
makeLenses ''LinearShockwave
|
makeLenses ''LinearShockwave
|
||||||
deriveJSON defaultOptions ''LinearShockwave
|
deriveJSON defaultOptions ''LinearShockwave
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ module Dodge.Data.Machine (
|
|||||||
module Dodge.Data.GenParams,
|
module Dodge.Data.GenParams,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -74,6 +71,3 @@ makePrisms ''MachineType
|
|||||||
deriveJSON defaultOptions ''Machine
|
deriveJSON defaultOptions ''Machine
|
||||||
deriveJSON defaultOptions ''MachineType
|
deriveJSON defaultOptions ''MachineType
|
||||||
deriveJSON defaultOptions ''Turret
|
deriveJSON defaultOptions ''Turret
|
||||||
$($(derive [d| instance Deriving (Store Turret ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Machine ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store MachineType) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Machine.Sensor where
|
module Dodge.Data.Machine.Sensor where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Dodge.Data.GenParams
|
import Dodge.Data.GenParams
|
||||||
@@ -48,6 +45,3 @@ makeLenses ''ProximityRequirement
|
|||||||
deriveJSON defaultOptions ''Sensor
|
deriveJSON defaultOptions ''Sensor
|
||||||
deriveJSON defaultOptions ''ProximityRequirement
|
deriveJSON defaultOptions ''ProximityRequirement
|
||||||
deriveJSON defaultOptions ''CloseToggle
|
deriveJSON defaultOptions ''CloseToggle
|
||||||
$($(derive [d| instance Deriving (Store Sensor) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ProximityRequirement) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store CloseToggle ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Magnet where
|
module Dodge.Data.Magnet where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -17,13 +14,11 @@ import Geometry.Data
|
|||||||
|
|
||||||
newtype MagnetUpdate = MagnetUpdateTimer Int
|
newtype MagnetUpdate = MagnetUpdateTimer Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store MagnetUpdate) |]))
|
|
||||||
|
|
||||||
data MagnetBuBu
|
data MagnetBuBu
|
||||||
= MagnetBuId
|
= MagnetBuId
|
||||||
| MagnetBuBuCurveAroundField Float Float
|
| MagnetBuBuCurveAroundField Float Float
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store MagnetBuBu) |]))
|
|
||||||
|
|
||||||
data Magnet = Magnet
|
data Magnet = Magnet
|
||||||
{ _mgID :: Int
|
{ _mgID :: Int
|
||||||
@@ -32,7 +27,6 @@ data Magnet = Magnet
|
|||||||
, _mgField :: MagnetBuBu
|
, _mgField :: MagnetBuBu
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Magnet ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Magnet
|
makeLenses ''Magnet
|
||||||
deriveJSON defaultOptions ''MagnetUpdate
|
deriveJSON defaultOptions ''MagnetUpdate
|
||||||
|
|||||||
@@ -5,15 +5,11 @@
|
|||||||
|
|
||||||
module Dodge.Data.Material where
|
module Dodge.Data.Material where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
|
|
||||||
data Material = Wood | Dirt | Stone | Glass | Metal | Crystal | Flesh | Electronics
|
data Material = Wood | Dirt | Stone | Glass | Metal | Crystal | Flesh | Electronics
|
||||||
deriving (Eq, Ord, Show, Bounded, Enum, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Bounded, Enum, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Material ) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''Material
|
deriveJSON defaultOptions ''Material
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Modification where
|
module Dodge.Data.Modification where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -32,7 +29,6 @@ data Modification
|
|||||||
, _mdUpdate :: MdWdWd
|
, _mdUpdate :: MdWdWd
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Modification) |]))
|
|
||||||
|
|
||||||
makeLenses ''Modification
|
makeLenses ''Modification
|
||||||
deriveJSON defaultOptions ''Modification
|
deriveJSON defaultOptions ''Modification
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.MountedObject where
|
module Dodge.Data.MountedObject where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -16,6 +13,5 @@ data MountedObject
|
|||||||
= MountedLS Int
|
= MountedLS Int
|
||||||
| MountedProp Int
|
| MountedProp Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store MountedObject) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''MountedObject
|
deriveJSON defaultOptions ''MountedObject
|
||||||
|
|||||||
@@ -5,14 +5,9 @@
|
|||||||
|
|
||||||
module Dodge.Data.ObjectType where
|
module Dodge.Data.ObjectType where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
|
|
||||||
data ObjectType
|
data ObjectType
|
||||||
= ObTerminal
|
= ObTerminal
|
||||||
@@ -33,4 +28,3 @@ instance ToJSONKey ObjectType
|
|||||||
instance FromJSONKey ObjectType
|
instance FromJSONKey ObjectType
|
||||||
|
|
||||||
deriveJSON defaultOptions ''ObjectType
|
deriveJSON defaultOptions ''ObjectType
|
||||||
$($(derive [d| instance Deriving (Store ObjectType) |]))
|
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ The warnings have been disabled.
|
|||||||
-}
|
-}
|
||||||
module Dodge.Data.PathGraph where
|
module Dodge.Data.PathGraph where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -58,7 +55,6 @@ data EdgeObstacle
|
|||||||
| AutoDoorObstacle
|
| AutoDoorObstacle
|
||||||
| WallObstacle
|
| WallObstacle
|
||||||
deriving (Eq, Ord, Show, Read, Bounded, Enum, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Bounded, Enum, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store EdgeObstacle) |]))
|
|
||||||
|
|
||||||
instance ToJSON EdgeObstacle where
|
instance ToJSON EdgeObstacle where
|
||||||
toEncoding = genericToEncoding defaultOptions
|
toEncoding = genericToEncoding defaultOptions
|
||||||
@@ -74,5 +70,3 @@ deriving instance (Flat (Gr Point2 PathEdge))
|
|||||||
|
|
||||||
makeLenses ''PathGraph
|
makeLenses ''PathGraph
|
||||||
makeLenses ''PathEdge
|
makeLenses ''PathEdge
|
||||||
$($(derive [d| instance Deriving (Store PathEdge ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store (Gr Point2 PathEdge) ) |]))
|
|
||||||
|
|||||||
@@ -5,15 +5,11 @@
|
|||||||
|
|
||||||
module Dodge.Data.Payload where
|
module Dodge.Data.Payload where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
|
|
||||||
data Payload = ExplosionPayload | DudPayload
|
data Payload = ExplosionPayload | DudPayload
|
||||||
deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Flat)
|
deriving (Show, Read, Eq, Ord, Enum, Bounded, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Payload ) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''Payload
|
deriveJSON defaultOptions ''Payload
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.PosEvent where
|
module Dodge.Data.PosEvent where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -16,9 +13,7 @@ import Data.Aeson.TH
|
|||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
|
|
||||||
data PosEventType = SparkSpawner
|
data PosEventType = SparkSpawner
|
||||||
| HackSparkSpawner
|
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store PosEventType ) |]))
|
|
||||||
|
|
||||||
data PosEvent = PosEvent
|
data PosEvent = PosEvent
|
||||||
{ _pvType :: PosEventType
|
{ _pvType :: PosEventType
|
||||||
@@ -26,7 +21,6 @@ data PosEvent = PosEvent
|
|||||||
, _pvPos :: Point2
|
, _pvPos :: Point2
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store PosEvent ) |]))
|
|
||||||
|
|
||||||
makeLenses ''PosEvent
|
makeLenses ''PosEvent
|
||||||
deriveJSON defaultOptions ''PosEventType
|
deriveJSON defaultOptions ''PosEventType
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.PressPlate where
|
module Dodge.Data.PressPlate where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -20,7 +17,6 @@ data PressPlateEvent
|
|||||||
= PressPlateId
|
= PressPlateId
|
||||||
| PPLevelReset
|
| PPLevelReset
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store PressPlateEvent) |]))
|
|
||||||
|
|
||||||
data PressPlate = PressPlate
|
data PressPlate = PressPlate
|
||||||
{ _ppPict :: Picture
|
{ _ppPict :: Picture
|
||||||
@@ -31,7 +27,6 @@ data PressPlate = PressPlate
|
|||||||
, _ppText :: String
|
, _ppText :: String
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store PressPlate ) |]))
|
|
||||||
|
|
||||||
makeLenses ''PressPlate
|
makeLenses ''PressPlate
|
||||||
deriveJSON defaultOptions ''PressPlateEvent
|
deriveJSON defaultOptions ''PressPlateEvent
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Projectile where
|
module Dodge.Data.Projectile where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -32,7 +29,6 @@ data Proj
|
|||||||
, _prjMITID :: Maybe Int
|
, _prjMITID :: Maybe Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Proj) |]))
|
|
||||||
|
|
||||||
makeLenses ''Proj
|
makeLenses ''Proj
|
||||||
deriveJSON defaultOptions ''Proj
|
deriveJSON defaultOptions ''Proj
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Prop where
|
module Dodge.Data.Prop where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -81,7 +78,3 @@ deriveJSON defaultOptions ''PropDraw
|
|||||||
deriveJSON defaultOptions ''PropUpdate
|
deriveJSON defaultOptions ''PropUpdate
|
||||||
deriveJSON defaultOptions ''PrWdLsLs
|
deriveJSON defaultOptions ''PrWdLsLs
|
||||||
deriveJSON defaultOptions ''Prop
|
deriveJSON defaultOptions ''Prop
|
||||||
$($(derive [d| instance Deriving (Store Prop) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store PropDraw) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store PropUpdate) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store PrWdLsLs) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.RadarBlip where
|
module Dodge.Data.RadarBlip where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -24,7 +21,6 @@ data RadarBlip = RadarBlip
|
|||||||
, _rbPos :: Point2
|
, _rbPos :: Point2
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store RadarBlip ) |]))
|
|
||||||
|
|
||||||
makeLenses ''RadarBlip
|
makeLenses ''RadarBlip
|
||||||
deriveJSON defaultOptions ''RadarBlip
|
deriveJSON defaultOptions ''RadarBlip
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ module Dodge.Data.RadarSweep (
|
|||||||
module Dodge.Data.ObjectType,
|
module Dodge.Data.ObjectType,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -26,7 +23,6 @@ data RadarSweep = RadarSweep
|
|||||||
, _rsTimer :: Int
|
, _rsTimer :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store RadarSweep ) |]))
|
|
||||||
|
|
||||||
makeLenses ''RadarSweep
|
makeLenses ''RadarSweep
|
||||||
deriveJSON defaultOptions ''RadarSweep
|
deriveJSON defaultOptions ''RadarSweep
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.RightButtonOptions where
|
module Dodge.Data.RightButtonOptions where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -61,6 +58,3 @@ makeLenses ''ActivateEquipment
|
|||||||
deriveJSON defaultOptions ''RightButtonOptions
|
deriveJSON defaultOptions ''RightButtonOptions
|
||||||
deriveJSON defaultOptions ''ActivateEquipment
|
deriveJSON defaultOptions ''ActivateEquipment
|
||||||
deriveJSON defaultOptions ''AllocateEquipment
|
deriveJSON defaultOptions ''AllocateEquipment
|
||||||
$($(derive [d| instance Deriving (Store RightButtonOptions) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ActivateEquipment) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store AllocateEquipment) |]))
|
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
|
||||||
module Dodge.Data.SaveSlot where
|
module Dodge.Data.SaveSlot where
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
|
|
||||||
@@ -15,6 +12,5 @@ data SaveSlot
|
|||||||
| LevelStartSlot Int
|
| LevelStartSlot Int
|
||||||
| SaveSlotNum Int
|
| SaveSlotNum Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store SaveSlot) |]))
|
|
||||||
|
|
||||||
makeLenses ''SaveSlot
|
makeLenses ''SaveSlot
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Shockwave where
|
module Dodge.Data.Shockwave where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Color
|
import Color
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -17,7 +14,6 @@ import Geometry.Data
|
|||||||
|
|
||||||
data ShockwaveDirection = OutwardShockwave | InwardShockwave
|
data ShockwaveDirection = OutwardShockwave | InwardShockwave
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ShockwaveDirection ) |]))
|
|
||||||
|
|
||||||
data Shockwave = Shockwave
|
data Shockwave = Shockwave
|
||||||
{ _swColor :: Color
|
{ _swColor :: Color
|
||||||
@@ -31,7 +27,6 @@ data Shockwave = Shockwave
|
|||||||
, _swTimer :: Int
|
, _swTimer :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Shockwave ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Shockwave
|
makeLenses ''Shockwave
|
||||||
deriveJSON defaultOptions ''ShockwaveDirection
|
deriveJSON defaultOptions ''ShockwaveDirection
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.SoundOrigin where
|
module Dodge.Data.SoundOrigin where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -40,7 +37,6 @@ data SoundOrigin
|
|||||||
| Explosion Int
|
| Explosion Int
|
||||||
| Tap Int
|
| Tap Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store SoundOrigin) |]))
|
|
||||||
|
|
||||||
instance ToJSONKey SoundOrigin
|
instance ToJSONKey SoundOrigin
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Spark where
|
module Dodge.Data.Spark where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -26,7 +23,6 @@ data Spark = Spark
|
|||||||
, _skDamageType :: DamageType
|
, _skDamageType :: DamageType
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store Spark ) |]))
|
|
||||||
|
|
||||||
makeLenses ''Spark
|
makeLenses ''Spark
|
||||||
deriveJSON defaultOptions ''Spark
|
deriveJSON defaultOptions ''Spark
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.Terminal where
|
module Dodge.Data.Terminal where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -141,15 +138,3 @@ deriveJSON defaultOptions ''BlBl
|
|||||||
deriveJSON defaultOptions ''EffectArguments
|
deriveJSON defaultOptions ''EffectArguments
|
||||||
deriveJSON defaultOptions ''TerminalCommandEffect
|
deriveJSON defaultOptions ''TerminalCommandEffect
|
||||||
deriveJSON defaultOptions ''TerminalCommand
|
deriveJSON defaultOptions ''TerminalCommand
|
||||||
$($(derive [d| instance Deriving (Store BlBl) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store EffectArguments) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalCommandEffect) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalCommand ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalStatus ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalInput ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalBootProgram) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Terminal ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalLineString ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TmTm) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalLine) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store TerminalToggle ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.TeslaArc where
|
module Dodge.Data.TeslaArc where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -24,7 +21,6 @@ data TeslaArc = TeslaArc
|
|||||||
, _taColor :: Color
|
, _taColor :: Color
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TeslaArc ) |]))
|
|
||||||
|
|
||||||
makeLenses ''TeslaArc
|
makeLenses ''TeslaArc
|
||||||
deriveJSON defaultOptions ''TeslaArc
|
deriveJSON defaultOptions ''TeslaArc
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.TractorBeam where
|
module Dodge.Data.TractorBeam where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -22,7 +19,6 @@ data TractorBeam = TractorBeam
|
|||||||
, _tbTime :: Int
|
, _tbTime :: Int
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TractorBeam ) |]))
|
|
||||||
|
|
||||||
makeLenses ''TractorBeam
|
makeLenses ''TractorBeam
|
||||||
deriveJSON defaultOptions ''TractorBeam
|
deriveJSON defaultOptions ''TractorBeam
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ module Dodge.Data.Universe (
|
|||||||
module Picture.Data,
|
module Picture.Data,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
--import qualified Data.Map.Strict as M
|
--import qualified Data.Map.Strict as M
|
||||||
@@ -98,4 +95,3 @@ makeLenses ''Universe
|
|||||||
makeLenses ''ScreenLayer
|
makeLenses ''ScreenLayer
|
||||||
makeLenses ''ConcEffect
|
makeLenses ''ConcEffect
|
||||||
makeLenses ''MenuOptionDisplay
|
makeLenses ''MenuOptionDisplay
|
||||||
$($(derive [d| instance Deriving (Store OptionScreenFlag ) |]))
|
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ module Dodge.Data.Wall (
|
|||||||
module Dodge.Data.Material,
|
module Dodge.Data.Material,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Color
|
import Color
|
||||||
@@ -49,7 +46,6 @@ data Opacity
|
|||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
|
|
||||||
data WallDraw = DrawForceField
|
data WallDraw = DrawForceField
|
||||||
| HackWallDraw
|
|
||||||
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
||||||
|
|
||||||
data WallStructure
|
data WallStructure
|
||||||
@@ -69,7 +65,3 @@ deriveJSON defaultOptions ''Wall
|
|||||||
deriveJSON defaultOptions ''Opacity
|
deriveJSON defaultOptions ''Opacity
|
||||||
deriveJSON defaultOptions ''WallDraw
|
deriveJSON defaultOptions ''WallDraw
|
||||||
deriveJSON defaultOptions ''WallStructure
|
deriveJSON defaultOptions ''WallStructure
|
||||||
$($(derive [d| instance Deriving (Store Wall ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Opacity) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store WallDraw ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store WallStructure) |]))
|
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ module Dodge.Data.World (
|
|||||||
module Dodge.Data.Hammer,
|
module Dodge.Data.Hammer,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Dodge.Data.SaveSlot
|
import Dodge.Data.SaveSlot
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -69,4 +66,3 @@ type HitEffect' =
|
|||||||
(World, Maybe Flame)
|
(World, Maybe Flame)
|
||||||
|
|
||||||
makeLenses ''World
|
makeLenses ''World
|
||||||
$($(derive [d| instance Deriving (Store TimeFlowStatus) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Dodge.Data.WorldEffect where
|
module Dodge.Data.WorldEffect where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Aeson.TH
|
import Data.Aeson.TH
|
||||||
@@ -21,7 +18,6 @@ data ItCrWdWd
|
|||||||
= ItCrWdId
|
= ItCrWdId
|
||||||
| ItCrWdItemEffect
|
| ItCrWdItemEffect
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ItCrWdWd) |]))
|
|
||||||
|
|
||||||
data WdWd
|
data WdWd
|
||||||
= NoWorldEffect
|
= NoWorldEffect
|
||||||
@@ -38,13 +34,11 @@ data WdWd
|
|||||||
| WdWdFromItCrixWdWd Item Int ItCrWdWd
|
| WdWdFromItCrixWdWd Item Int ItCrWdWd
|
||||||
deriving (Eq, Show, Read, Generic)
|
deriving (Eq, Show, Read, Generic)
|
||||||
--hderiving (Eq, Show, Read, Generic, Flat)
|
--hderiving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store WdWd) |]))
|
|
||||||
|
|
||||||
data WdP2
|
data WdP2
|
||||||
= WdP2Const Point2
|
= WdP2Const Point2
|
||||||
| WdYouPos
|
| WdYouPos
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store WdP2) |]))
|
|
||||||
|
|
||||||
data MdWdWd
|
data MdWdWd
|
||||||
= MdWdId
|
= MdWdId
|
||||||
@@ -52,7 +46,6 @@ data MdWdWd
|
|||||||
| MdSetLSCol Point3
|
| MdSetLSCol Point3
|
||||||
| MdFlickerUpdate
|
| MdFlickerUpdate
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store MdWdWd) |]))
|
|
||||||
|
|
||||||
data WdBl
|
data WdBl
|
||||||
= WdTrig Int
|
= WdTrig Int
|
||||||
@@ -63,13 +56,11 @@ data WdBl
|
|||||||
| WdBlBtOn Int
|
| WdBlBtOn Int
|
||||||
| WdBlBtNotOff Int
|
| WdBlBtNotOff Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store WdBl) |]))
|
|
||||||
|
|
||||||
data WdP2f
|
data WdP2f
|
||||||
= WdP2f0
|
= WdP2f0
|
||||||
| WdP2fDoorPosition Int
|
| WdP2fDoorPosition Int
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store WdP2f) |]))
|
|
||||||
|
|
||||||
data DrWdWd
|
data DrWdWd
|
||||||
= DrWdId
|
= DrWdId
|
||||||
@@ -77,7 +68,6 @@ data DrWdWd
|
|||||||
| DrWdMechanismStepwise Int [Int] [(Point2, Point2)]
|
| DrWdMechanismStepwise Int [Int] [(Point2, Point2)]
|
||||||
| DoorMechanism
|
| DoorMechanism
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store DrWdWd) |]))
|
|
||||||
|
|
||||||
data TmWdWd
|
data TmWdWd
|
||||||
= TmWdId
|
= TmWdId
|
||||||
@@ -87,7 +77,6 @@ data TmWdWd
|
|||||||
| TmWdWdDoDeathTriggers
|
| TmWdWdDoDeathTriggers
|
||||||
deriving (Eq, Show, Read, Generic)
|
deriving (Eq, Show, Read, Generic)
|
||||||
--hderiving (Eq, Show, Read, Generic, Flat)
|
--hderiving (Eq, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store TmWdWd) |]))
|
|
||||||
|
|
||||||
deriveJSON defaultOptions ''ItCrWdWd
|
deriveJSON defaultOptions ''ItCrWdWd
|
||||||
deriveJSON defaultOptions ''WdWd
|
deriveJSON defaultOptions ''WdWd
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
-- | GameRooms contain information about given positions in the world
|
-- | GameRooms contain information about given positions in the world
|
||||||
module Dodge.GameRoom where
|
module Dodge.GameRoom where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
@@ -26,7 +23,6 @@ data GameRoom = GameRoom
|
|||||||
, _grName :: String
|
, _grName :: String
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store GameRoom ) |]))
|
|
||||||
|
|
||||||
instance ToJSON GameRoom where
|
instance ToJSON GameRoom where
|
||||||
toEncoding = genericToEncoding defaultOptions
|
toEncoding = genericToEncoding defaultOptions
|
||||||
|
|||||||
+5
-32
@@ -6,52 +6,25 @@ module Dodge.Save (
|
|||||||
writeSaveSlot,
|
writeSaveSlot,
|
||||||
readSaveSlot,
|
readSaveSlot,
|
||||||
reloadLevelStart,
|
reloadLevelStart,
|
||||||
toJSONSaveSlot,
|
|
||||||
fromJSONSaveSlot,
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.Binary
|
--import Flat
|
||||||
import Flat
|
|
||||||
import Dodge.Concurrent
|
import Dodge.Concurrent
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Dodge.Data.SaveSlot
|
import Dodge.Data.SaveSlot
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import qualified Data.Aeson.Encode.Pretty as AEP
|
import qualified Data.Aeson.Encode.Pretty as AEP
|
||||||
import qualified Data.ByteString.Lazy as BS
|
import qualified Data.ByteString.Lazy as BS
|
||||||
import qualified Data.ByteString as BSS
|
--import qualified Data.ByteString as BSS
|
||||||
import Dodge.Data.Universe
|
import Dodge.Data.Universe
|
||||||
--import qualified Data.Set as S
|
--import qualified Data.Set as S
|
||||||
import System.Directory
|
import System.Directory
|
||||||
|
|
||||||
|
|
||||||
writeSaveSlot :: SaveSlot -> Universe -> IO (Universe -> Maybe Universe)
|
writeSaveSlot :: SaveSlot -> Universe -> IO (Universe -> Maybe Universe)
|
||||||
writeSaveSlot ss u = do
|
writeSaveSlot ss u = do
|
||||||
putStrLn $ "Saving " ++ saveSlotPath ss
|
putStrLn $ "Saving " ++ saveSlotPath ss
|
||||||
createDirectoryIfMissing True "saveSlot"
|
createDirectoryIfMissing True "saveSlot"
|
||||||
-- BSS.writeFile (saveSlotPath ss) $
|
|
||||||
-- flat
|
|
||||||
-- (u ^. uvWorld . cWorld)
|
|
||||||
return Just
|
|
||||||
|
|
||||||
readSaveSlot :: SaveSlot -> IO (Universe -> Maybe Universe)
|
|
||||||
readSaveSlot ss = do
|
|
||||||
fExists <- doesFileExist $ saveSlotPath ss
|
|
||||||
-- if fExists
|
|
||||||
-- then do
|
|
||||||
-- bsstr <- BSS.readFile $ saveSlotPath ss
|
|
||||||
-- let cwstr = unflat bsstr
|
|
||||||
-- case cwstr of
|
|
||||||
-- Left _ -> putStrLn "loadSaveSlot failed to read saved file" >> return removescreenlayers
|
|
||||||
-- Right cw -> return $ \uv -> Just $ uv & uvWorld . cWorld .~ cw
|
|
||||||
-- & uvScreenLayers .~ []
|
|
||||||
-- else putStrLn "loadSaveSlot failed to find saved file" >> return removescreenlayers
|
|
||||||
return Just
|
|
||||||
where
|
|
||||||
removescreenlayers = Just . (uvScreenLayers .~ [])
|
|
||||||
|
|
||||||
toJSONSaveSlot :: SaveSlot -> Universe -> IO (Universe -> Maybe Universe)
|
|
||||||
toJSONSaveSlot ss u = do
|
|
||||||
putStrLn $ "Saving " ++ saveSlotPath ss
|
|
||||||
createDirectoryIfMissing True "saveSlot"
|
|
||||||
BS.writeFile (saveSlotPath ss) $
|
BS.writeFile (saveSlotPath ss) $
|
||||||
AEP.encodePretty'
|
AEP.encodePretty'
|
||||||
(AEP.Config (AEP.Spaces 2) compare AEP.Generic False)
|
(AEP.Config (AEP.Spaces 2) compare AEP.Generic False)
|
||||||
@@ -59,8 +32,8 @@ toJSONSaveSlot ss u = do
|
|||||||
return Just
|
return Just
|
||||||
|
|
||||||
|
|
||||||
fromJSONSaveSlot :: SaveSlot -> IO (Universe -> Maybe Universe)
|
readSaveSlot :: SaveSlot -> IO (Universe -> Maybe Universe)
|
||||||
fromJSONSaveSlot ss = do
|
readSaveSlot ss = do
|
||||||
fExists <- doesFileExist $ saveSlotPath ss
|
fExists <- doesFileExist $ saveSlotPath ss
|
||||||
if fExists
|
if fExists
|
||||||
then do
|
then do
|
||||||
|
|||||||
@@ -14,11 +14,8 @@ module Geometry.ConvexPoly (
|
|||||||
pointInPolyPoints,
|
pointInPolyPoints,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import Geometry.Intersect
|
import Geometry.Intersect
|
||||||
@@ -34,7 +31,6 @@ data ConvexPoly = ConvexPoly
|
|||||||
, _cpRad :: Float
|
, _cpRad :: Float
|
||||||
}
|
}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ConvexPoly ) |]))
|
|
||||||
|
|
||||||
instance ToJSON ConvexPoly where
|
instance ToJSON ConvexPoly where
|
||||||
toEncoding = genericToEncoding defaultOptions
|
toEncoding = genericToEncoding defaultOptions
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ module IntSetHelp (
|
|||||||
|
|
||||||
import Data.IntSet.Internal
|
import Data.IntSet.Internal
|
||||||
import Data.IntSet
|
import Data.IntSet
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
|
|
||||||
-- IntSet is not an instance of Generic?!
|
-- IntSet is not an instance of Generic?!
|
||||||
|
|||||||
@@ -6,9 +6,6 @@
|
|||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
module LinearHelp where
|
module LinearHelp where
|
||||||
|
|
||||||
import Data.Store
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Linear.V2
|
import Linear.V2
|
||||||
import Linear.V3
|
import Linear.V3
|
||||||
@@ -17,6 +14,3 @@ import Linear.V4
|
|||||||
deriving instance (Flat a => Flat (V2 a))
|
deriving instance (Flat a => Flat (V2 a))
|
||||||
deriving instance (Flat a => Flat (V3 a))
|
deriving instance (Flat a => Flat (V3 a))
|
||||||
deriving instance (Flat a => Flat (V4 a))
|
deriving instance (Flat a => Flat (V4 a))
|
||||||
$($(derive [d| instance Store a => Deriving (Store (V2 a)) |]))
|
|
||||||
$($(derive [d| instance Store a => Deriving (Store (V3 a)) |]))
|
|
||||||
$($(derive [d| instance Store a => Deriving (Store (V4 a)) |]))
|
|
||||||
|
|||||||
@@ -6,16 +6,12 @@
|
|||||||
|
|
||||||
module MaybeHelp where
|
module MaybeHelp where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
|
|
||||||
data Maybe' a = Just' {__Just' :: a} | Nothing'
|
data Maybe' a = Just' {__Just' :: a} | Nothing'
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
instance (Binary a => Binary (Maybe' a))
|
|
||||||
|
|
||||||
instance ToJSON a => ToJSON (Maybe' a) where
|
instance ToJSON a => ToJSON (Maybe' a) where
|
||||||
toEncoding = genericToEncoding defaultOptions
|
toEncoding = genericToEncoding defaultOptions
|
||||||
@@ -44,4 +40,3 @@ toggleJust Nothing = Just ()
|
|||||||
toggleJust _ = Nothing
|
toggleJust _ = Nothing
|
||||||
|
|
||||||
makeLenses ''Maybe'
|
makeLenses ''Maybe'
|
||||||
$($(derive [d| instance Store a => Deriving (Store (Maybe' a)) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Picture.Data where
|
module Picture.Data where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -42,7 +39,6 @@ numLayers = length [minBound :: Layer .. maxBound]
|
|||||||
|
|
||||||
newtype ShadNum = ShadNum {_unShadNum :: Int}
|
newtype ShadNum = ShadNum {_unShadNum :: Int}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store ShadNum) |]))
|
|
||||||
|
|
||||||
polyNum, polyzNum, bezNum, textNum, arcNum, ellNum :: ShadNum
|
polyNum, polyzNum, bezNum, textNum, arcNum, ellNum :: ShadNum
|
||||||
{-# INLINE polyNum #-}
|
{-# INLINE polyNum #-}
|
||||||
@@ -96,5 +92,3 @@ makeLenses ''Verx
|
|||||||
deriveJSON defaultOptions ''Verx
|
deriveJSON defaultOptions ''Verx
|
||||||
deriveJSON defaultOptions ''Layer
|
deriveJSON defaultOptions ''Layer
|
||||||
deriveJSON defaultOptions ''ShadNum
|
deriveJSON defaultOptions ''ShadNum
|
||||||
$($(derive [d| instance Deriving (Store Verx ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store Layer) |]))
|
|
||||||
|
|||||||
@@ -15,10 +15,7 @@ module Quaternion (
|
|||||||
module Linear.Quaternion,
|
module Linear.Quaternion,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import Geometry.Vector3D
|
import Geometry.Vector3D
|
||||||
@@ -48,4 +45,3 @@ vToQuat a b
|
|||||||
cprod = crossProd a b
|
cprod = crossProd a b
|
||||||
|
|
||||||
deriving instance (Flat a => Flat (Quaternion a))
|
deriving instance (Flat a => Flat (Quaternion a))
|
||||||
$($(derive [d| instance Store a => Deriving (Store (Quaternion a)) |]))
|
|
||||||
|
|||||||
@@ -8,12 +8,8 @@
|
|||||||
|
|
||||||
module Shape.Data where
|
module Shape.Data where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import Geometry.Data
|
import Geometry.Data
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
@@ -30,7 +26,6 @@ newtype ShapeType = TopPrism Int
|
|||||||
deriving stock Generic
|
deriving stock Generic
|
||||||
deriving anyclass Flat
|
deriving anyclass Flat
|
||||||
|
|
||||||
$($(derive [d| instance Deriving (Store ShapeType) |]))
|
|
||||||
|
|
||||||
data ShapeObj = ShapeObj
|
data ShapeObj = ShapeObj
|
||||||
{ _shType :: ShapeType
|
{ _shType :: ShapeType
|
||||||
@@ -71,5 +66,3 @@ type Shape' = Stream (Of ShapeObj) IO ()
|
|||||||
|
|
||||||
type Shape = [ShapeObj]
|
type Shape = [ShapeObj]
|
||||||
|
|
||||||
$($(derive [d| instance Deriving (Store ShapeV ) |]))
|
|
||||||
$($(derive [d| instance Deriving (Store ShapeObj ) |]))
|
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
|
|
||||||
module Sound.Data where
|
module Sound.Data where
|
||||||
|
|
||||||
import TH.Derive
|
|
||||||
import Data.Store
|
|
||||||
import Data.Binary
|
|
||||||
import Flat
|
import Flat
|
||||||
import LinearHelp ()
|
import LinearHelp ()
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
@@ -36,7 +33,6 @@ data PlayStatus
|
|||||||
|
|
||||||
newtype SoundID = SoundID {_getSoundID :: Int}
|
newtype SoundID = SoundID {_getSoundID :: Int}
|
||||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||||
$($(derive [d| instance Deriving (Store SoundID) |]))
|
|
||||||
|
|
||||||
newtype SoundData = SoundData
|
newtype SoundData = SoundData
|
||||||
{ _loadedChunks :: IM.IntMap Mix.Chunk
|
{ _loadedChunks :: IM.IntMap Mix.Chunk
|
||||||
|
|||||||
Reference in New Issue
Block a user