More nesting of fields in CWorld

This commit is contained in:
2022-08-19 11:41:07 +01:00
parent 3b7841677a
commit 2e34481ab1
9 changed files with 58 additions and 40 deletions
+18 -9
View File
@@ -15,6 +15,7 @@ defaultWorld :: World
defaultWorld =
World
{ _cWorld = defaultCWorld
, _clickMousePos = V2 0 0
, _toPlaySounds = M.empty
, _playingSounds = M.empty
, _randGen = mkStdGen 2
@@ -109,17 +110,10 @@ defaultCWorld =
, _buttons = IM.empty
, _corpses = IM.empty
, _decorations = IM.empty
, _clickMousePos = V2 0 0
, _pathGraph = Data.Graph.Inductive.Graph.empty
, _pnZoning = mempty
, _peZoning = mempty
, _hud =
HUD
{ _hudElement = DisplayInventory NoSubInventory
, _carteCenter = V2 0 0
, _carteZoom = 0.5
, _carteRot = 0
}
, _hud = defaultHUD
, _lightSources = IM.empty
, _tempLightSources = []
, _closeObjects = []
@@ -131,12 +125,27 @@ defaultCWorld =
, _selLocation = 0
, _foregroundShapes = mempty
, _distortions = []
, _worldClock = 0
, _cwTime = defaultCWTime
}
defaultCWTime :: CWTime
defaultCWTime =
CWTime
{ _worldClock = 0
, _maybeWorld = Nothing'
, _rewindWorlds = []
, _deathDelay = Nothing
}
defaultHUD :: HUD
defaultHUD =
HUD
{ _hudElement = DisplayInventory NoSubInventory
, _carteCenter = V2 0 0
, _carteZoom = 0.5
, _carteRot = 0
}
defaultWorldHammers :: M.Map WorldHammer HammerPosition
defaultWorldHammers = M.fromSet (const HammerUp) $ S.fromList [minBound .. maxBound]