diff options
Diffstat (limited to 'src/rect.c')
-rw-r--r-- | src/rect.c | 31 |
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; +} |