Safe Haskell | None |
---|---|
Language | Haskell2010 |
- mainLoop :: Backend a AppOutput -> SF AppInput AppOutput -> IO ()
- data Backend a b = Backend {
- initAction :: IO a
- inputAction :: Bool -> IO (DTime, Maybe a)
- outputAction :: Bool -> b -> IO Bool
- parseInput :: SF a AppInput
- closeAction :: IO ()
- data BackendConfiguration = BackendConfiguration {
- windowWidth :: Int
- windowHeight :: Int
- windowName :: String
- windowResizable :: Bool
- fps :: Double
- defaultBackendConfiguration :: BackendConfiguration
- sdlBackend :: BackendConfiguration -> IO (Backend (Event EventPayload) AppOutput)
- data AppInput = AppInput {}
- initAppInput :: AppInput
- quit :: SF AppInput (Event ())
- anyKeyActive :: SF AppInput (Event Scancode)
- anyKeyPress :: SF AppInput (Event Scancode)
- mouseLeftActive :: SF AppInput (Event (V2 Double))
- mouseLeftPress :: SF AppInput (Event (V2 Double))
- mouseRightActive :: SF AppInput (Event (V2 Double))
- mouseRightPress :: SF AppInput (Event (V2 Double))
- mousePosition :: SF AppInput (V2 Double)
- data AppOutput = AppOutput {}
- data Graphics = Graphics {
- camera :: Camera
- objects :: [RenderShape]
- data Camera = Camera {}
- data RenderShape = RS {}
- data Sound = NotImplementedYet
- container :: V2 Double -> [RenderShape] -> [RenderShape]
- data Shape
- data ShapeColour
- animate :: Animation -> SF a (Maybe RenderShape)
- data Animation = Animation {
- frames :: [(Time, RenderShape)]
- type_ :: AnimationType
- data AnimationType
- newAnimation :: [(Time, RenderShape)] -> AnimationType -> Animation
- module Data.Colour.Names
- module Data.Colour.SRGB
- module Linear.V2
- module SDL.Input.Keyboard.Codes
MainLoop
Backend
Backend | |
|
data BackendConfiguration Source #
BackendConfiguration | |
|
sdlBackend :: BackendConfiguration -> IO (Backend (Event EventPayload) AppOutput) Source #
Set up SDL
Input
Your main SF receives AppInput as input
SFs
Output
Your main SF needs to create an AppOutput
data RenderShape Source #
container :: V2 Double -> [RenderShape] -> [RenderShape] Source #
Shapes
data ShapeColour Source #
Animation
Animation | |
|
newAnimation :: [(Time, RenderShape)] -> AnimationType -> Animation Source #
module Data.Colour.Names
module Data.Colour.SRGB
module Linear.V2
module SDL.Input.Keyboard.Codes