aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mgl/graphics/rectangle.h2
-rw-r--r--include/mgl/graphics/sprite.h2
-rw-r--r--include/mgl/system/vec.h (renamed from include/mgl/graphics/vec.h)4
-rw-r--r--include/mgl/window.h6
4 files changed, 10 insertions, 4 deletions
diff --git a/include/mgl/graphics/rectangle.h b/include/mgl/graphics/rectangle.h
index 7c2403b..5bcc521 100644
--- a/include/mgl/graphics/rectangle.h
+++ b/include/mgl/graphics/rectangle.h
@@ -1,8 +1,8 @@
#ifndef MGL_RECTANGLE_H
#define MGL_RECTANGLE_H
+#include "../system/vec.h"
#include "color.h"
-#include "vec.h"
typedef struct mgl_context mgl_context;
diff --git a/include/mgl/graphics/sprite.h b/include/mgl/graphics/sprite.h
index 045da19..ea40b21 100644
--- a/include/mgl/graphics/sprite.h
+++ b/include/mgl/graphics/sprite.h
@@ -1,8 +1,8 @@
#ifndef MGL_SPRITE_H
#define MGL_SPRITE_H
+#include "../system/vec.h"
#include "color.h"
-#include "vec.h"
typedef struct mgl_context mgl_context;
typedef struct mgl_texture mgl_texture;
diff --git a/include/mgl/graphics/vec.h b/include/mgl/system/vec.h
index 562f560..8b87376 100644
--- a/include/mgl/graphics/vec.h
+++ b/include/mgl/system/vec.h
@@ -5,4 +5,8 @@ typedef struct {
float x, y;
} mgl_vec2f;
+typedef struct {
+ int x, y;
+} mgl_vec2i;
+
#endif /* MGL_VEC_H */
diff --git a/include/mgl/window.h b/include/mgl/window.h
index 34920a8..0184577 100644
--- a/include/mgl/window.h
+++ b/include/mgl/window.h
@@ -1,6 +1,8 @@
#ifndef MGL_WINDOW_H
#define MGL_WINDOW_H
+#include "system/vec.h"
+
typedef struct mgl_window mgl_window;
typedef struct {
@@ -11,8 +13,8 @@ typedef struct {
struct mgl_window {
unsigned long window;
mgl_window_callback callback;
- int width;
- int height;
+ mgl_vec2i size;
+ mgl_vec2i cursor_position;
};
int mgl_window_create(mgl_window *self, const char *title, int width, int height, mgl_window_callback *callback);