diff -r 67cde01e8359 -r fe6f35cc987b macros.h --- a/macros.h Wed Aug 11 21:48:27 2004 +0000 +++ b/macros.h Wed Aug 11 22:07:08 2004 +0000 @@ -130,7 +130,14 @@ #define SPRITE_PALETTE(x) ((x) + 0x8000) extern const byte _ffb_64[128]; +/* Returns the position of the first bit that is not zero, counted from the + * left. Ie, 10110100 returns 2, 00000001 returns 0, etc. When x == 0 returns + * 0. + */ #define FIND_FIRST_BIT(x) _ffb_64[(x)] +/* 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] static INLINE int FindFirstBit2x64(int value) @@ -212,4 +219,6 @@ ((byte*)b)[1] = (byte)(x >> 8); } +#define MAX_DETOUR 6 + #endif /* MACROS_H */