Commit mid add time scroll

This commit is contained in:
2022-10-24 10:44:23 +01:00
parent 21dc670c9f
commit 86a9ab7582
17 changed files with 62 additions and 55 deletions
+1 -20
View File
@@ -114,18 +114,7 @@ data CWCam = CWCam
, _cwcBoundDist :: (Float, Float, Float, Float) -- NSEW, S and W negative
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
data CWorld = CWorld
--{ _cameraCenter :: Point2
--, _cameraRot :: Float
--, _cameraZoom :: Float -- smaller values zoom out
--, _itemZoom :: Float
--, _defaultZoom :: Float
--, _cameraViewFrom :: Point2
--, _viewDistance :: Float
--, _boundBox :: [Point2]
--, _boundDist :: (Float, Float, Float, Float) -- NSEW, S and W negative
{ _cwCam :: CWCam
, _creatures :: IM.IntMap Creature
, _crZoning :: IM.IntMap (IM.IntMap IS.IntSet)
@@ -186,19 +175,12 @@ data CWorld = CWorld
, _seenLocations :: IM.IntMap (WdP2, String)
, _selLocation :: Int
, _distortions :: [Distortion]
, _cwTime :: CWTime
, _cwGen :: CWGen
}
--deriving (Eq, Show, Read) --, Generic)
--h--deriving (Eq, Show, Read) --Generic, Flat)
data CWTime = CWTime
{ _maybeWorld :: Maybe' CWorld
, _rewindWorlds :: [CWorld]
, _worldClock :: Int
, _deathDelay :: Maybe Int
}
--deriving (Eq, Show, Read) --, Generic)
--h--deriving (Eq, Show, Read) --Generic, Flat)
@@ -226,13 +208,12 @@ makeLenses ''CWorld
makeLenses ''WorldBeams
makeLenses ''CWCam
makeLenses ''CWGen
makeLenses ''CWTime
concat
<$> mapM
(deriveJSON defaultOptions)
[ ''WorldBeams
, ''CWCam
, ''CWGen
, ''CWTime
-- , ''CWTime
, ''CWorld
]
+1
View File
@@ -19,6 +19,7 @@ data HeldScroll
{ _hsInt :: Int
, _hsMaxInt :: Int
}
| HeldScrollTime
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''HeldScroll
+2 -2
View File
@@ -10,7 +10,7 @@ import Data.Aeson.TH
import Dodge.Data.CamouflageStatus
import Dodge.Data.Item.Combine
data HeldUse
data Huse
= HeldDoNothing
| HeldUseAmmoParams
| HeldOverNozzlesUseGasParams
@@ -94,5 +94,5 @@ data HeldMod
deriveJSON defaultOptions ''Cuse
deriveJSON defaultOptions ''HeldMod
deriveJSON defaultOptions ''Euse
deriveJSON defaultOptions ''HeldUse
deriveJSON defaultOptions ''Huse
deriveJSON defaultOptions ''Luse
+1 -1
View File
@@ -25,7 +25,7 @@ import Dodge.Data.Item.HeldDelay
data ItemUse
= HeldUse
{ _heldUse :: HeldUse
{ _heldUse :: Huse
, _heldDelay :: UseDelay
, _heldMods :: HeldMod
, _heldHammer :: HammerPosition
+12
View File
@@ -23,6 +23,7 @@ import Dodge.Data.SoundOrigin
import Geometry.Data
import SDL (MouseButton, Scancode)
import Sound.Data
import MaybeHelp
import System.Random
data World = World
@@ -44,12 +45,14 @@ data World = World
, _backspaceTimer :: Int
, _timeFlow :: TimeFlowStatus
, _rbOptions :: RightButtonOptions
, _cwTime :: CWTime
}
data TimeFlowStatus
= RewindingNow
| RewindingLastFrame
| NormalTimeFlow
| ScrollTimeFlow
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data WorldHammer
@@ -57,4 +60,13 @@ data WorldHammer
| DoubleMouseHam
deriving (Eq, Ord, Show, Read, Enum, Bounded)
data CWTime = CWTime
{ _maybeWorld :: Maybe' CWorld
, _rewindWorlds :: [CWorld]
, _futureWorlds :: [CWorld]
, _worldClock :: Int
, _deathDelay :: Maybe Int
}
makeLenses ''World
makeLenses ''CWTime