Add Binary instances

This commit is contained in:
2022-08-21 10:58:19 +01:00
parent 386a2b4732
commit 1ce7d4a72d
95 changed files with 345 additions and 3 deletions
+5
View File
@@ -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