blob: 19ed87f832f99c0ae52187cafe19ba6b9d3af386 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}
|