(svn r9672) -Cleanup: lots of coding style fixes around operands.

This commit is contained in:
rubidium
2007-04-18 22:10:36 +00:00
parent 41cf2fa69b
commit 80c259f64f
62 changed files with 1051 additions and 1051 deletions

View File

@@ -82,9 +82,9 @@ template<typename T> static inline T TOGGLEBIT(T& x, int y)
/* 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 @@ extern const byte _ffb_64[128];
/* 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 @@ static inline int KillFirstBit2x64(int value)
#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) \