affection- A simple Game Engine using SDL

Safe HaskellNone




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 #


:: 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 #


:: 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