Move toward better info display during level generation

This commit is contained in:
2021-11-10 23:40:04 +00:00
parent 9aefc11e17
commit a195157e54
13 changed files with 122 additions and 118 deletions
+6 -9
View File
@@ -12,14 +12,15 @@ import Dodge.Config.Data
import Dodge.Config.Update
import SDL
import SDL.Internal.Numbered
import Dodge.Layout
import Dodge.Floor
--import Dodge.Layout
--import Dodge.Floor
import Dodge.Initialisation
import Preload.Update
import Dodge.Base.Window
import Dodge.SoundLogic
import Control.Lens
--import Control.Monad.State
optionMenu :: ScreenLayer
optionMenu = OptionScreen
{ _scTitle = const "OPTIONS"
@@ -159,13 +160,9 @@ pauseMenuOptions =
startNewGame :: World -> Maybe World
startNewGame w = Just $ w
& menuLayers .~ [WaitScreen (const "GENERATING...") 1]
& worldEvents .~ const aNewGame
where
aNewGame :: World
aNewGame = updateFramebufferSize $ generateLevelFromRoomList (levx 1) $ initialWorld
& randGen .~ _randGen w
& config .~ _config w
& preloadData .~ _preloadData w
-- & worldEvents .~ const aNewGame
& sideEffects .~ const (firstWorld <&> keyConfig .~ _keyConfig w <&> config .~ _config w
<&> preloadData .~ _preloadData w) -- this kills save games etc...
-- | hacky
scodeToChar :: Scancode -> Char