pituicat/src/Util.hs

33 lines
492 B
Haskell
Raw Normal View History

2021-01-11 23:51:58 +00:00
module Util where
import Affection
import qualified SDL
2021-01-11 23:53:00 +00:00
import Linear
2021-01-11 23:51:58 +00:00
-- internal imports
2021-01-11 23:53:00 +00:00
import Types.Application
2021-01-11 23:51:58 +00:00
globalKeyHandle
:: GameData
-> KeyboardMessage
-> Affection ()
2021-09-05 08:46:33 +00:00
globalKeyHandle _ mesg@MsgKeyboardEvent {} =
2021-01-11 23:51:58 +00:00
case mesg of
MsgKeyboardEvent
_
_
SDL.Pressed
False
(SDL.Keysym SDL.ScancodeF11 _ _) ->
toggleScreen 0
2021-01-11 23:51:58 +00:00
_ -> return ()
2021-01-11 23:53:00 +00:00
constG :: V2 Double
constG = V2 0 (-500)
2021-07-24 01:33:00 +00:00
bounceThreshold :: Double
bounceThreshold = 200