/* ** 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; }