Commit towards merge

This commit is contained in:
2022-03-20 17:18:12 +00:00
parent 6c3e335ded
commit 5e897c6a6c
10 changed files with 301 additions and 98 deletions
+10 -9
View File
@@ -52,7 +52,7 @@ trySeedFromClipboard :: Universe -> IO (Maybe Universe)
trySeedFromClipboard u = do
mcstr <- getClipboardString
case mcstr >>= readMaybe of
Nothing -> pushScreen (seedStartMenu "CLIPBOARD UNUSABLE, NEED INTEGER")
Nothing -> pushScreen (seedStartMenu "CLIPBOARD UNUSABLE, NEED INTEGER")
(u & menuLayers %~ tail)
Just i -> return . Just $ startSeedGame i u
@@ -71,8 +71,8 @@ optionsOptions =
]
debugMenu :: ScreenLayer
debugMenu = slTitleOptions
"OPTIONS:GAMEPLAY"
debugMenuOptions
"OPTIONS:GAMEPLAY"
debugMenuOptions
debugMenuOptions :: [MenuOption]
debugMenuOptions =
[ doption ScancodeF debug_seconds_frame "SHOW SECONDS/FRAME" _debug_seconds_frame
@@ -82,7 +82,7 @@ debugMenuOptions =
, doption ScancodeP debug_pathing "SHOW PATHING" _debug_pathing
]
where
doption scode l t rec
doption scode l t rec
= Toggle scode (return . Just . (config . l %~ not)) (\w -> t ++ ":" ++ show (rec $ _config w))
gameplayMenu :: ScreenLayer
gameplayMenu = slTitleOptions
@@ -107,10 +107,10 @@ soundMenuOptions =
, theoption ScancodeN volume_music ScancodeM "MUSIC VOLUME:" _volume_music
]
where
theoption scod1 stype scod2 str voltype = Toggle2
scod1
theoption scod1 stype scod2 str voltype = Toggle2
scod1
(change dec stype)
scod2
scod2
(change inc stype)
(\w -> str ++ show (round $ 10 * voltype (_config w)::Int))
change g vt = return . Just . (config . vt %~ g) . sw
@@ -127,7 +127,7 @@ graphicsMenu = slTitleOptions "OPTIONS:GRAPHICS" graphicsMenuOptions
graphicsMenuOptions :: [MenuOption]
graphicsMenuOptions =
[ makeEnumOption ScancodeS resolution_factor "RESOLUTION" updateFramebufferSize
, makeBoolOption ScancodeW wall_textured "WALL TEXTURES"
, makeBoolOption ScancodeW wall_textured "WALL TEXTURES"
, makeBoolOption ScancodeD cloud_shadows "CLOUD SHADOWS"
]
@@ -139,10 +139,11 @@ gameOverMenu = OptionScreen
, _scOptionFlag = GameOverOptions
}
-- | hacky
-- | hacky - no longer used
scodeToChar :: Scancode -> Char
scodeToChar = toEnum . (+ 61) . fromIntegral . unwrapScancode
--charToScode :: Char -> Scancode
--charToScode = Scancode . fromIntegral . (\x -> x - 61) . fromEnum