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
+3
View File
@@ -5,6 +5,7 @@
module Dodge.Data.PressPlate where
import Data.Binary
import Flat
import LinearHelp ()
import Control.Lens
@@ -17,6 +18,7 @@ data PressPlateEvent
= PressPlateId
| PPLevelReset
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary PressPlateEvent
data PressPlate = PressPlate
{ _ppPict :: Picture
@@ -27,6 +29,7 @@ data PressPlate = PressPlate
, _ppText :: String
}
deriving (Eq, Ord, Show, Read, Generic, Flat)
instance Binary PressPlate
makeLenses ''PressPlate
deriveJSON defaultOptions ''PressPlateEvent