astrds-0.1: src/RenderTitle.hs
module RenderTitle where
import qualified Graphics.UI.SDL as SDL
import qualified Graphics.Rendering.OpenGL as GL
import RenderInterface
import RenderUtil
import StaticInterface
import Static
import Config
-- | This function is called /before/ initialising static
-- (so that the player can already admire the title without
-- waiting for the whole loading marathon)
renderTitle :: IO ()
renderTitle = do
clearScreen
-- load the partial information we need
fnts <- loadFonts
img <- bgPic >>= loadPNGPic
-- render title image
renderImg img (fromIntegral maxXview / 2, fromIntegral maxYview / 2)
SDL.glSwapBuffers
-- render title texts
renderTextCFnt gametitle textColour (fromIntegral maxXview / 2, fromIntegral maxYview / 2 -40)
(bigfont fnts)
showScreen
SDL.delay 1500
return ()