diff options
author | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:11:21 +0200 |
---|---|---|
committer | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:51:35 +0200 |
commit | ae44478b30d890fe0fb04022f44d474dcdcc3f9d (patch) | |
tree | 5f462459ae4b47d22114eed717d1382d08cf4dfe /sdl2/rect.ha |
Diffstat (limited to 'sdl2/rect.ha')
-rw-r--r-- | sdl2/rect.ha | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sdl2/rect.ha b/sdl2/rect.ha new file mode 100644 index 0000000..012088e --- /dev/null +++ b/sdl2/rect.ha @@ -0,0 +1,29 @@ +// TODO: Flesh me out + +// The structure that defines a point (integer) +export type SDL_Point = struct { + x: int, + y: int, +}; + +// The structure that defines a point (floating point) +export type SDL_FPoint = struct { + x: f32, + y: f32, +}; + +// A rectangle, with the origin at the upper left (integer). +export type SDL_Rect = struct { + x: int, + y: int, + w: int, + h: int, +}; + +// A rectangle, with the origin at the upper left (floating point). +export type SDL_FRect = struct { + x: f32, + y: f32, + w: f32, + h: f32, +}; |