Merge pull request #74 from GabrielRavier/parenthesizeFlagsMacros
Parenthesize flag macros
This commit is contained in:
commit
4e322f25c4
1 changed files with 3 additions and 3 deletions
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
// Macros for setting, un-setting and getting flags
|
// Macros for setting, un-setting and getting flags
|
||||||
// Each flag is stored in a bit, so we can use the exact same macros we'd use for bits
|
// Each flag is stored in a bit, so we can use the exact same macros we'd use for bits
|
||||||
#define SET_FLAG(x, i) ((x)[(i) / 8] |= 1 << (i) % 8)
|
#define SET_FLAG(x, i) ((x)[(i) / 8] |= 1 << ((i) % 8))
|
||||||
#define UNSET_FLAG(x, i) ((x)[(i) / 8] &= ~(1 << (i) % 8))
|
#define UNSET_FLAG(x, i) ((x)[(i) / 8] &= ~(1 << ((i) % 8)))
|
||||||
#define GET_FLAG(x, i) ((x)[(i) / 8] & (1 << (i) % 8))
|
#define GET_FLAG(x, i) ((x)[(i) / 8] & (1 << ((i) % 8)))
|
||||||
|
|
||||||
unsigned char gFlagNPC[1000];
|
unsigned char gFlagNPC[1000];
|
||||||
unsigned char gSkipFlag[8];
|
unsigned char gSkipFlag[8];
|
||||||
|
|
Loading…
Add table
Reference in a new issue