affection-0.0.0.9: A simple Game Engine using SDL

Safe HaskellNone
LanguageHaskell2010

Affection.Util

Synopsis

Documentation

preHandleEvents :: [Event] -> Affection us [EventPayload] Source #

Prehandle SDL events

getAffection :: Affection us us Source #

Return the userstate to the user

putAffection :: us -> Affection us () Source #

Put altered user state back

delaySec Source #

Arguments

:: Int

Number of seconds

-> IO () 

block a thread for a specified amount of time

getElapsedTime :: Affection us Double Source #

Get time since start but always the same in the current tick.

getDelta :: Affection us Double Source #

Get delta time (time elapsed from last frame)

quit :: Affection us () Source #

Quit the engine loop

toggleScreen :: Affection us () Source #

Toggle the Screen mode between Windowed and FullscreenDesktop. Pauses the Engine in the process.

fitViewport Source #

Arguments

:: Double

Image Ratio (width / height)

-> WindowMessage

Incoming Message. Listens only on MsgWindowResize and ignores all others.

-> Affection us () 

Fit the GL Viewport to Window size