Add Binary instances
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
module Dodge.Data.Prop where
|
||||
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import Color
|
||||
import Control.Lens
|
||||
@@ -40,6 +41,7 @@ data Prop
|
||||
, _prToggle :: Bool
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Prop
|
||||
|
||||
data PropDraw
|
||||
= PropDrawSPic SPic
|
||||
@@ -52,6 +54,7 @@ data PropDraw
|
||||
| PropDrawToggle PropDraw
|
||||
| PropDrawGib Float
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PropDraw
|
||||
|
||||
data PropUpdate
|
||||
= PropUpdateAnd PropUpdate PropUpdate
|
||||
@@ -66,12 +69,14 @@ data PropUpdate
|
||||
| PropUpdateWhen WdBl PropUpdate
|
||||
| PropUpdateIf WdBl PropUpdate PropUpdate
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PropUpdate
|
||||
|
||||
data PrWdLsLs
|
||||
= PrWdLsId
|
||||
| PrWdLsSetPosition WdP2f Point3
|
||||
| PrWdLsSetColor Point3
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary PrWdLsLs
|
||||
|
||||
makeLenses ''Prop
|
||||
deriveJSON defaultOptions ''PropDraw
|
||||
|
||||
Reference in New Issue
Block a user