LambdaHack-0.8.1.2: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client.UI.Frontend.Sdl

Contents

Description

Text frontend based on SDL2.

Synopsis

Documentation

startup :: ClientOptions -> IO RawFrontend Source #

Set up and start the main loop providing input and output.

Apparently some SDL backends are not thread-safe (https://wiki.libsdl.org/FAQDevelopment; "this should only be run in the thread that initialized the video subsystem, and for extra safety, you should consider only doing those things on the main thread in any case") so we stick to a single bound thread (but not to the main thread; enough is enough and at least in the case of OpenGL all bound threads are supposed to be as good as the main thread).

frontendName :: String Source #

The name of the frontend.

Internal operations

display Source #

Arguments

:: FrontendSession

frontend session data

-> SingleFrame

the screen frame to draw

-> IO () 

Add a frame to be drawn.

drawFrame Source #

Arguments

:: ClientOptions 
-> FrontendSession

frontend session data

-> SingleFrame

the screen frame to draw

-> IO () 

modTranslate :: KeyModifier -> Modifier Source #

Translates modifiers to our own encoding, ignoring Shift.