Move configuration from world to universe

This commit is contained in:
2021-11-28 22:30:47 +00:00
parent 45ba120796
commit 8c5777a1af
29 changed files with 343 additions and 300 deletions
+5 -4
View File
@@ -58,6 +58,7 @@ data Universe = Universe
, _menuLayers :: [ScreenLayer]
, _savedWorlds :: M.Map SaveSlot World
, _keyConfig :: KeyConfigSDL
, _config :: Configuration
}
data World = World
{ _keys :: !(S.Set Scancode)
@@ -116,12 +117,13 @@ data World = World
, _distortions :: [Distortion]
, _worldBounds :: Bounds
, _gameRooms :: [GameRoom] -- consider using and IntMap
, _config :: Configuration
, _rewindWorlds :: [World]
, _rewinding :: Bool
, _frameClock :: Int
, _worldClock :: Int
, _lSelHammerPosition :: HammerPosition
, _worldTerminal :: Maybe' WorldTerminal
}
data WorldTerminal = WorldTerminal Int [(Int,String)]
data SaveSlot = QuicksaveSlot | LevelStartSlot
deriving (Eq,Ord)
@@ -136,7 +138,6 @@ data ScreenLayer
}
| ColumnsScreen String [(String,String)]
| InputScreen String
| TerminalScreen Int [(Int,String)]
| WaitScreen
{ _scWaitMessage :: Universe -> String
, _scWaitTime :: Int
@@ -216,7 +217,7 @@ data Creature = Creature
, _crOldDir :: Float
, _crMvDir :: Float
, _crID :: Int
, _crPict :: Creature -> World -> SPic
, _crPict :: Creature -> Configuration -> World -> SPic
, _crUpdate :: Creature -> World -> (Endo World, Maybe Creature)
, _crRad :: Float
, _crMass :: Float