From 3282ab0cd838ab7e070021cd2a537d78e60d263a Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 28 Dec 2017 21:52:04 +0100 Subject: Imported sources files into the Git Signed-off-by: Olivier Gayot --- src/rect.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/rect.c (limited to 'src/rect.c') 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 +** +** 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; +} -- cgit v1.2.3