Add more deriving clauses

This commit is contained in:
2022-07-25 09:26:41 +01:00
parent c3a5b9d5be
commit d62e14cdb5
8 changed files with 22 additions and 13 deletions
+5 -7
View File
@@ -299,18 +299,16 @@ data World = World
, _lSelect :: Point2
, _rSelect :: Point2
}
-- deriving (Eq,Show,Read)
data WorldHammer
= SubInvHam
| DoubleMouseHam
deriving (Eq,Ord,Show,Read,Enum,Bounded)
--deriving (Eq,Show,Read)
data TimeFlowStatus
= RewindingNow
| RewindingLastFrame
| NormalTimeFlow
deriving (Eq,Ord,Show,Read)
data WorldHammer
= SubInvHam
| DoubleMouseHam
deriving (Eq,Ord,Show,Read,Enum,Bounded)
data SaveSlot = QuicksaveSlot | LevelStartSlot
deriving (Eq,Ord,Show,Read)
+1
View File
@@ -10,6 +10,7 @@ data Bounds = Bounds
, _bdMinY :: Float
, _bdMaxY :: Float
}
deriving (Eq,Ord,Show,Read)
defaultBounds :: Bounds
defaultBounds = Bounds 0 0 0 0
+5 -1
View File
@@ -10,6 +10,7 @@ import Color
data ButtonDraw = DefaultDrawButton Color
| DefaultDrawSwitch Color Color
| DrawNoButton
deriving (Eq,Ord,Show,Read)
data ButtonEvent = ButtonDoNothing
| ButtonPress
{_bpState :: ButtonState
@@ -32,6 +33,7 @@ data ButtonEvent = ButtonDoNothing
,_boffEff :: WdWd
}
| ButtonAccessTerminal
deriving (Eq,Ord,Show,Read)
data Button = Button
{ _btPict :: ButtonDraw --Button -> SPic
@@ -45,6 +47,8 @@ data Button = Button
, _btName :: String
, _btColor :: Color
}
deriving (Eq,Ord,Show,Read)
data ButtonState = BtOn | BtOff | BtNoLabel
deriving (Eq, Show)
deriving (Eq,Ord,Show,Read)
makeLenses ''Button
makeLenses ''ButtonEvent
+6 -3
View File
@@ -5,30 +5,33 @@ import Geometry
import Control.Lens
data LightSourceDraw = DefaultLightSourceDraw
deriving (Eq,Ord,Show,Read)
data TLSIntensity = ConstantIntensity
| TLSFade Point3 Int
deriving (Eq,Ord,Show,Read)
data TLSUpdate = DestroyTLS
| TimerTLS
| IntensityTLS TLSIntensity
deriving (Eq,Ord,Show,Read)
data LSParam = LSParam
{ _lsPos :: !Point3
, _lsRad :: !Float
, _lsCol :: !Point3
}
deriving (Eq,Ord,Show,Read)
data LightSource = LS
{ _lsID :: Int
, _lsParam :: LSParam
, _lsDir :: Float
, _lsPict :: LightSourceDraw --LightSource -> Picture
}
deriving (Eq,Ord,Show,Read)
data TempLightSource = TLS
{ _tlsParam :: LSParam
, _tlsUpdate :: TLSUpdate --TempLightSource -> Maybe TempLightSource
, _tlsTime :: Int
}
deriving (Eq,Ord,Show,Read)
makeLenses ''LSParam
makeLenses ''LightSource
makeLenses ''TempLightSource
+1
View File
@@ -22,4 +22,5 @@ data Modification
, _mdExternalID2 :: Int
, _mdUpdate :: MdWdWd
}
deriving (Eq,Ord,Show,Read)
makeLenses ''Modification
+3
View File
@@ -13,11 +13,13 @@ data RightButtonOptions
,_opAllocateEquipment :: AllocateEquipment
,_opActivateEquipment :: ActivateEquipment
}
deriving (Eq,Ord,Show,Read)
data ActivateEquipment
= ActivateEquipment {_activateEquipment :: Int }
| DeactivateEquipment {_deactivateEquipment :: Int}
| ActivateDeactivateEquipment {_activateEquipment :: Int ,_deactivateEquipment :: Int}
| NoChangeActivateEquipment
deriving (Eq,Ord,Show,Read)
data AllocateEquipment
= DoNotMoveEquipment
| PutOnEquipment
@@ -39,6 +41,7 @@ data AllocateEquipment
| RemoveEquipment
{ _allocOldPos :: EquipPosition
}
deriving (Eq,Ord,Show,Read)
makeLenses ''RightButtonOptions
makeLenses ''AllocateEquipment
makeLenses ''ActivateEquipment
+1
View File
@@ -5,3 +5,4 @@ import Geometry
data Distortion
= RadialDistortion Point2 Point2 Point2 Float
deriving (Eq,Ord,Show,Read)
-2
View File
@@ -3,8 +3,6 @@ import Dodge.Data
import Geometry
import Color
import LensHelp
import ShapePicture
import Shape
import Dodge.Default.Wall
import Dodge.Default.Block