aboutsummaryrefslogtreecommitdiff
path: root/src/Game/Utils.hs
blob: 35bb7f6464142cd49f239d1b0ff6c1286d8645c2 (plain)
1
2
3
4
5
6
7
8
module Game.Utils (rect) where

import Foreign.C.Types (CInt)
import SDL qualified
import SDL.Vect (V2 (..))

rect :: Int -> Int -> Int -> Int -> SDL.Rectangle CInt
rect x y w h = SDL.Rectangle (SDL.P $ V2 (fromIntegral x) (fromIntegral y)) (V2 (fromIntegral w) (fromIntegral h))