Compounds | |
class | djColor |
Defines | |
#define | MAKEINT16(lo, hi) ((lo) | ((hi)<<8)) |
Make 16 bit integer from low and high 8-bit components. | |
#define | DEL(x) if (x) { delete (x); x = NULL; } |
Helper for "delete" operator. | |
#define | DELV(x) if (x) { delete[] (x); x = NULL; } |
Helper for "delete[]" operator. | |
#define | INBOUNDS(x, y, x1, y1, x2, y2) ( (x)>=(x1) && (x)<=(x2) && (y)>=(y1) && (y)<=(y2) ) |
Return true if point (x,y) is (inclusively) inside the rectangle (x1, y1, x2, y2). | |
#define | INBOUNDS2(x, x1, x2) ( (x)>=(x1) && (x)<=(x2) ) |
Return true if value x is in the range [x1, x2]. | |
#define | OVERLAPS(x0, y0, x1, y1, x2, y2, x3, y3) ( (!( ((x0)<(x2) && (x1)<(x2)) || ((x0)>(x3) && (x1)>(x3)) || ((y0)<(y2) && (y1)<(y2)) || ((y0)>(y3) && (y1)>(y3)) )) ) |
Test if rectangle (x0, y0, x1, y1) overlaps rectangle (x2, y2, x3, y3). | |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
Return smaller of (a, b). | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
Return larger of (a, b). | |
#define | ABS(a) ((a) < 0 ? -(a) : (a)) |
Return absolute value of (a). | |
#define | SGN(a) ((a) < 0 ? -1 : 1) |
Return -1 if (a) is negative or 1 if a is positive. | |
#define | NULL ((void *)0) |
http://www.scorpioncity.com/djgame.html Copyright (C) David Joffe. Generated: 15 Jul 2001 |