Move menu layers outside of world

This commit is contained in:
2021-11-28 14:26:15 +00:00
parent 574f195b21
commit 462100703c
13 changed files with 132 additions and 124 deletions
+9 -6
View File
@@ -56,10 +56,13 @@ firstWorldLoad theConfig = do
theKeyConfig <- loadKeyConfig
pdata <- doPreload >>= applyWorldConfig theConfig
w <- generateWorldFromSeed 0
return $ Universe ( w
& keyConfig .~ theKeyConfig
& config .~ theConfig
) pdata
return $ Universe
{_uvWorld = w
& keyConfig .~ theKeyConfig
& config .~ theConfig
,_preloadData = pdata
,_menuLayers = []
}
theUpdateStep :: Universe -> IO Universe
theUpdateStep = doSideEffects <=< updateRenderSplit
@@ -67,8 +70,8 @@ theUpdateStep = doSideEffects <=< updateRenderSplit
updateRenderSplit :: Universe -> IO Universe
updateRenderSplit u = do
let preData = _preloadData u
update (_uvWorld u) `par` void (doDrawing (_renderData preData) (_uvWorld u))
return $ u {_uvWorld = update (_uvWorld u)}
updateUniverse u `par` void (doDrawing (_renderData preData) u)
return $ updateUniverse u
playSoundUnlessRewinding :: Universe -> IO (M.Map SoundOrigin Sound)
playSoundUnlessRewinding u