diff -r f40e88cff863 -r 646711c5feaa src/macros.h --- a/src/macros.h Sun Apr 15 17:04:44 2007 +0000 +++ b/src/macros.h Sat Apr 21 08:23:57 2007 +0000 @@ -82,9 +82,9 @@ /* checking more bits. Maybe unneccessary, but easy to use */ -#define HASBITS(x,y) ((x) & (y)) -#define SETBITS(x,y) ((x) |= (y)) -#define CLRBITS(x,y) ((x) &= ~(y)) +#define HASBITS(x, y) ((x) & (y)) +#define SETBITS(x, y) ((x) |= (y)) +#define CLRBITS(x, y) ((x) &= ~(y)) #define GENERAL_SPRITE_COLOR(color) ((color) + PALETTE_RECOLOR_START) #define PLAYER_SPRITE_COLOR(owner) (GENERAL_SPRITE_COLOR(_player_colors[owner])) @@ -98,7 +98,7 @@ /* Returns x with the first bit that is not zero, counted from the left, set * to zero. So, 10110100 returns 10110000, 00000001 returns 00000000, etc. */ -#define KILL_FIRST_BIT(x) _ffb_64[(x)+64] +#define KILL_FIRST_BIT(x) _ffb_64[(x) + 64] static inline int FindFirstBit2x64(int value) { @@ -133,13 +133,13 @@ #define HAS_SINGLE_BIT(a) ( ((a) & ((a) - 1)) == 0) /* [min,max), strictly less than */ -#define IS_BYTE_INSIDE(a,min,max) ((byte)((a)-(min)) < (byte)((max)-(min))) -#define IS_INT_INSIDE(a,min,max) ((uint)((a)-(min)) < (uint)((max)-(min))) +#define IS_BYTE_INSIDE(a, min, max) ((byte)((a) - (min)) < (byte)((max) - (min))) +#define IS_INT_INSIDE(a, min, max) ((uint)((a) - (min)) < (uint)((max) - (min))) -#define CHANCE16(a,b) ((uint16)Random() <= (uint16)((65536 * (a)) / (b))) -#define CHANCE16R(a,b,r) ((uint16)(r=Random()) <= (uint16)((65536 * (a)) / (b))) -#define CHANCE16I(a,b,v) ((uint16)(v) <= (uint16)((65536 * (a)) / (b))) +#define CHANCE16(a, b) ((uint16)Random() <= (uint16)((65536 * (a)) / (b))) +#define CHANCE16R(a, b, r) ((uint16)(r = Random()) <= (uint16)((65536 * (a)) / (b))) +#define CHANCE16I(a, b, v) ((uint16)(v) <= (uint16)((65536 * (a)) / (b))) #define for_each_bit(_i, _b) \