Add Binary instances
This commit is contained in:
@@ -8,6 +8,7 @@ module Dodge.Data.Wall (
|
||||
module Dodge.Data.Material,
|
||||
) where
|
||||
|
||||
import Data.Binary
|
||||
import Flat
|
||||
import LinearHelp ()
|
||||
import Color
|
||||
@@ -37,6 +38,7 @@ data Wall = Wall
|
||||
, _wlMaterial :: Material
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Wall
|
||||
|
||||
data Opacity
|
||||
= SeeThrough
|
||||
@@ -44,9 +46,11 @@ data Opacity
|
||||
| DrawnWall {_opDraw :: WallDraw} -- Wall -> SPic
|
||||
| Opaque
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary Opacity
|
||||
|
||||
data WallDraw = DrawForceField
|
||||
deriving (Eq, Ord, Show, Read, Enum, Bounded, Generic, Flat)
|
||||
instance Binary WallDraw
|
||||
|
||||
data WallStructure
|
||||
= StandaloneWall
|
||||
@@ -57,6 +61,7 @@ data WallStructure
|
||||
{ _wlStCreature :: Int
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read, Generic, Flat)
|
||||
instance Binary WallStructure
|
||||
|
||||
makeLenses ''Wall
|
||||
makeLenses ''Opacity
|
||||
|
||||
Reference in New Issue
Block a user