Cleanup
This commit is contained in:
@@ -6,7 +6,7 @@ import Data.Aeson
|
||||
import Dodge.Data.Config
|
||||
import System.Directory
|
||||
|
||||
loadDodgeConfig :: IO Configuration
|
||||
loadDodgeConfig :: IO Config
|
||||
loadDodgeConfig = do
|
||||
fExists <- doesFileExist "data/dodge.config.json"
|
||||
if fExists
|
||||
|
||||
@@ -17,7 +17,7 @@ import Sound
|
||||
{- |
|
||||
Write the current world configuration to disk as a json file.
|
||||
-}
|
||||
saveConfig :: Configuration -> (a -> IO a) -> a -> IO a
|
||||
saveConfig :: Config -> (a -> IO a) -> a -> IO a
|
||||
saveConfig cfig f x = do
|
||||
-- putStrLn "Saving config to data/dodge.config.json"
|
||||
BS.writeFile "data/dodge.config.json" $
|
||||
@@ -27,7 +27,7 @@ saveConfig cfig f x = do
|
||||
{- |
|
||||
Apply the volume settings from the world configuration to the running game.
|
||||
-}
|
||||
setVol :: Configuration -> IO ()
|
||||
setVol :: Config -> IO ()
|
||||
setVol cfig = do
|
||||
setSoundVolume (_volume_master cfig * _volume_sound cfig)
|
||||
setMusicVolume (_volume_master cfig * _volume_music cfig)
|
||||
@@ -36,7 +36,7 @@ setVol cfig = do
|
||||
Apply /all/ of the values in the world configuration to the running game.
|
||||
-}
|
||||
applyWorldConfig ::
|
||||
Configuration ->
|
||||
Config ->
|
||||
PreloadData ->
|
||||
IO PreloadData
|
||||
applyWorldConfig cfig pdata = do
|
||||
|
||||
Reference in New Issue
Block a user