nyx-game-1.0.1.0: A bullet-hell game made with SDL2.

Safe HaskellNone
LanguageHaskell2010

Play.Engine.MySDL.MySDL

Synopsis

Documentation

withWindow :: Text -> WindowConfig -> (Window -> IO a) -> IO a Source #

Init SDL and create a Window and pass in as a parameter to function

withRenderer :: MonadIO m => Window -> ((Window, Renderer) -> m a) -> m a Source #

apploop :: ResourcesT TVar -> TQueue Response -> Window -> Renderer -> a -> ([Response] -> [EventPayload] -> (Scancode -> Bool) -> a -> IO (Either [String] ([Request], a))) -> (a -> IO ()) -> IO a Source #

App loop: takes the current world and functions that updates the world renders it manage ticks, events and loop

regulateFPS :: Word32 -> Word32 -> Word32 -> IO () Source #

Will wait until ticks pass

collectEvents :: MonadIO m => m [EventPayload] Source #

Collect all events from inputs

checkEvent :: EventPayload -> [EventPayload] -> Bool Source #

Checks if specific event happend

data ResourceType a Source #

Constructors

Texture a 
Font a 
Music a 

type family HKD f a where ... Source #

Equations

HKD Identity a = a 
HKD f a = f a