Linting, haddocking
This commit is contained in:
+5
-6
@@ -39,7 +39,7 @@ main = do
|
||||
dodgeConfig <- loadDodgeConfig
|
||||
setupLoop
|
||||
(sizex,sizey)
|
||||
(SDL.cursorVisible $= False >> doPreload' dodgeConfig >>= resizeSpareFBO sizex sizey)
|
||||
(SDL.cursorVisible $= False >> doPreload >>= applyWorldConfig dodgeConfig)
|
||||
(\x -> (SDL.cursorVisible $= True) >> cleanUpPreload x)
|
||||
(fmap (setWindowSize sizex sizey keyConfig . (config .~ dodgeConfig)) firstWorld)
|
||||
doSideEffects
|
||||
@@ -64,14 +64,13 @@ doSideEffects preData w = do
|
||||
foldr (=<<) (return (preData & soundData . playingSounds .~ newPlayingSounds
|
||||
& frameTimer .~ endTicks)) (_doneSideEffects w)
|
||||
|
||||
doPreload' :: Dodge.Config.Data.Configuration -> IO (PreloadData a)
|
||||
doPreload' config = do
|
||||
doPreload :: IO (PreloadData a)
|
||||
doPreload = do
|
||||
lChunks <- loadSounds
|
||||
lMusic <- loadMusic
|
||||
let sData = SoundData {_loadedChunks = lChunks, _playingSounds = M.empty}
|
||||
mData = MusicData {_loadedMusic = lMusic}
|
||||
Mix.playMusic Mix.Forever (lMusic IM.! 0)
|
||||
setVolume config
|
||||
rData <- preloadRender
|
||||
return $ PreloadData
|
||||
{ _renderData = rData
|
||||
@@ -87,6 +86,6 @@ checkForGlErrors = do
|
||||
|
||||
setWindowSize :: Int -> Int -> KeyConfigSDL-> World -> World
|
||||
setWindowSize x y z w = w
|
||||
& windowX .~ fromIntegral x
|
||||
& windowY .~ fromIntegral y
|
||||
& config . windowX .~ fromIntegral x
|
||||
& config . windowY .~ fromIntegral y
|
||||
& keyConfig .~ z
|
||||
|
||||
Reference in New Issue
Block a user