Move from store to flat
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{-# LANGUAGE StrictData #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
|
||||
module Dodge.Data.CWorld (
|
||||
module Dodge.Data.CWorld,
|
||||
@@ -47,8 +48,7 @@ module Dodge.Data.CWorld (
|
||||
module Dodge.Data.WorldEffect,
|
||||
) where
|
||||
|
||||
import TH.Derive
|
||||
import Data.Store
|
||||
import Flat
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -113,6 +113,7 @@ data CWCam = CWCam
|
||||
, _cwcBoundBox :: [Point2]
|
||||
, _cwcBoundDist :: (Float, Float, Float, Float) -- NSEW, S and W negative
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data CWorld = CWorld
|
||||
--{ _cameraCenter :: Point2
|
||||
@@ -186,6 +187,7 @@ data CWorld = CWorld
|
||||
, _cwTime :: CWTime
|
||||
, _cwGen :: CWGen
|
||||
}
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
data CWTime = CWTime
|
||||
{ _maybeWorld :: Maybe' CWorld
|
||||
@@ -193,6 +195,7 @@ data CWTime = CWTime
|
||||
, _worldClock :: Int
|
||||
, _deathDelay :: Maybe Int
|
||||
}
|
||||
deriving (Eq, Show, Read, Generic, Flat)
|
||||
|
||||
|
||||
data CWGen = CWGen
|
||||
@@ -202,6 +205,7 @@ data CWGen = CWGen
|
||||
, _cwgRoomClipping :: [ConvexPoly]
|
||||
, _cwgSeed :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
data WorldBeams = WorldBeams
|
||||
{ _blockingBeams :: [Beam]
|
||||
@@ -209,7 +213,7 @@ data WorldBeams = WorldBeams
|
||||
, _positronBeams :: [Beam]
|
||||
, _electronBeams :: [Beam]
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
|
||||
deriveJSON defaultOptions ''CWorld
|
||||
deriveJSON defaultOptions ''WorldBeams
|
||||
@@ -221,9 +225,3 @@ makeLenses ''WorldBeams
|
||||
makeLenses ''CWCam
|
||||
makeLenses ''CWGen
|
||||
makeLenses ''CWTime
|
||||
|
||||
$($(derive [d| instance Deriving (Store CWorld) |]))
|
||||
$($(derive [d| instance Deriving (Store WorldBeams) |]))
|
||||
$($(derive [d| instance Deriving (Store CWCam) |]))
|
||||
$($(derive [d| instance Deriving (Store CWGen) |]))
|
||||
$($(derive [d| instance Deriving (Store CWTime) |]))
|
||||
|
||||
Reference in New Issue
Block a user