32 lines
515 B
C
32 lines
515 B
C
#ifndef _GDEFINS_H__
|
|
#define _GDEFINS_H__
|
|
|
|
#include <stdint.h>
|
|
#define MAKE_ALIGNX(size, align) ((size+align-1)&(~(align-1)))
|
|
|
|
#define ALIGN_UP(x, a) ( ( ((x) + ((a) - 1) ) / a ) * a )
|
|
#define ALIGN_DOWN(x, a) ( ( (x) / (a)) * (a) )
|
|
|
|
typedef struct _gd_size{
|
|
int width;
|
|
int height;
|
|
}GD_SIZE;
|
|
|
|
typedef struct _gd_rect{
|
|
int x;
|
|
int y;
|
|
int w;
|
|
int h;
|
|
}GD_RECT;
|
|
|
|
typedef struct _gd_point_f{
|
|
float x;
|
|
float y;
|
|
}GD_POINT_F;
|
|
|
|
typedef struct _point {
|
|
int x;
|
|
int y;
|
|
}GD_POINT;
|
|
#endif
|