aboutsummaryrefslogtreecommitdiff
path: root/sdl2/rect.ha
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2021-12-09 14:36:32 +0100
committerDrew DeVault <sir@cmpwn.com>2021-12-09 14:36:32 +0100
commit07046a3b2c2d0b6a5dfaaab70e5ea71e8334df1b (patch)
treee134285c86f6052b9c19ae7755acafa0137e215b /sdl2/rect.ha
parentAdd README.md (diff)
downloadhare-chip8-07046a3b2c2d0b6a5dfaaab70e5ea71e8334df1b.tar.gz
sdl2::image: initial commit
Some additional things which were needed to make this work were also added.
Diffstat (limited to 'sdl2/rect.ha')
-rw-r--r--sdl2/rect.ha29
1 files changed, 29 insertions, 0 deletions
diff --git a/sdl2/rect.ha b/sdl2/rect.ha
new file mode 100644
index 0000000..00fae87
--- /dev/null
+++ b/sdl2/rect.ha
@@ -0,0 +1,29 @@
+// TODO: Flesh me out
+
+// The structure that defines a point (integer)
+export type point = struct {
+ x: int,
+ y: int,
+};
+
+// The structure that defines a point (floating point)
+export type fpoint = struct {
+ x: f32,
+ y: f32,
+};
+
+// A rectangle, with the origin at the upper left (integer).
+export type rect = struct {
+ x: int,
+ y: int,
+ w: int,
+ h: int,
+};
+
+// A rectangle, with the origin at the upper left (floating point).
+export type frect = struct {
+ x: f32,
+ y: f32,
+ w: f32,
+ h: f32,
+};