initialize :: IO App
initialize = do
  screen <- screenInit 640 480 32 "Hardest game"
  fontInit
  SDLm.openAudio 22050 SDLm.AudioS16Sys 2 4096

  music      <- SDLm.loadMUS "Example.ogg"

  scratch    <- SDLm.loadWAV "scratch.wav"
  high       <- SDLm.loadWAV "high.wav"
  med        <- SDLm.loadWAV "medium.wav"
  low        <- SDLm.loadWAV "low.wav"


  return $ App screen emptyHandle (AppConfig music scratch high med low)
  {-mainFont <- TTFM.openFont "lazy.ttf" 28
  cTime    <- getCPUTimeDouble
  imags <- forM imgs (\(file, params) -> loadImage (file ++ ".png") params)
  let hash = zipWith (\(file, _) im -> (intern file, im)) imgs imags in
    return $ App (Screen screen width height bpp) (Player (80, 240) 0 150) (Handle False []) mainFont startLevels cTime hash
  -}
  -- imgs = [("player", Nothing), ("enemy", Just (255, 255, 255)), ("gold", Just (255, 255, 255))]
initialize :: IO App
initialize = do
  screen <- screenInit 640 480 32 "Hardest game"
  fontInit
  SDLm.openAudio 22050 SDLm.AudioS16Sys 2 4096

  music      <- SDLm.loadMUS "Example.ogg"

  scratch    <- SDLm.loadWAV "scratch.wav"
  high       <- SDLm.loadWAV "high.wav"
  med        <- SDLm.loadWAV "medium.wav"
  low        <- SDLm.loadWAV "low.wav"


  return $ App screen emptyHandle (AppConfig music scratch high med low)
  {-mainFont <- TTFM.openFont "lazy.ttf" 28
  cTime    <- getCPUTimeDouble
  imags <- forM imgs (\(file, params) -> loadImage (file ++ ".png") params)
  let hash = zipWith (\(file, _) im -> (intern file, im)) imgs imags in
    return $ App (Screen screen width height bpp) (Player (80, 240) 0 150) (Handle False []) mainFont startLevels cTime hash
  -}
  -- imgs = [("player", Nothing), ("enemy", Just (255, 255, 255)), ("gold", Just (255, 255, 255))]
initialize = do
  screen <- screenInit 640 480 32 "Hardest game"
  fontInit
  SDLm.openAudio 22050 SDLm.AudioS16Sys 2 4096

  music      <- SDLm.loadMUS "Example.ogg"

  scratch    <- SDLm.loadWAV "scratch.wav"
  high       <- SDLm.loadWAV "high.wav"
  med        <- SDLm.loadWAV "medium.wav"
  low        <- SDLm.loadWAV "low.wav"


  return $ App screen emptyHandle (AppConfig music scratch high med low)
  {-mainFont <- TTFM.openFont "lazy.ttf" 28
  cTime    <- getCPUTimeDouble
  imags <- forM imgs (\(file, params) -> loadImage (file ++ ".png") params)
  let hash = zipWith (\(file, _) im -> (intern file, im)) imgs imags in
    return $ App (Screen screen width height bpp) (Player (80, 240) 0 150) (Handle False []) mainFont startLevels cTime hash
  -}
  -- imgs = [("player", Nothing), ("enemy", Just (255, 255, 255)), ("gold", Just (255, 255, 255))]