summaryrefslogtreecommitdiff
path: root/src/rect.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2017-12-28 21:52:04 +0100
committerOlivier Gayot <duskcoder@gmail.com>2017-12-28 21:52:04 +0100
commit3282ab0cd838ab7e070021cd2a537d78e60d263a (patch)
treea05ead754b3dd1ac8bf2dc9549c77d5ab135d238 /src/rect.c
Imported sources files into the Git
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'src/rect.c')
-rw-r--r--src/rect.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/rect.c b/src/rect.c
new file mode 100644
index 0000000..19ed87f
--- /dev/null
+++ b/src/rect.c
@@ -0,0 +1,31 @@
+/*
+** rect.c for in /home/gayot_o/prog/lib/sdl-digit
+**
+** Made by olivier gayot
+** Login <gayot_o@epitech.net>
+**
+** Started on Mon Apr 23 08:12:40 2012 olivier gayot
+** Last update Mon Apr 23 08:12:40 2012 olivier gayot
+*/
+
+#include "sdl_digit.h"
+
+SDL_Rect get_rect(int x, int y, unsigned int w, unsigned int h) {
+ SDL_Rect rect;
+
+ rect.x = x;
+ rect.y = y;
+ rect.w = w;
+ rect.h = h;
+ return rect;
+}
+
+SDL_Rect *new_rect(int x, int y, unsigned int w, unsigned int h) {
+ SDL_Rect *rect = (SDL_Rect *)malloc(sizeof(SDL_Rect));
+
+ rect->x = x;
+ rect->y = y;
+ rect->w = w;
+ rect->h = h;
+ return rect;
+}