diff options
author | Pan7 <panter@gmx.net> | 2014-08-28 19:15:54 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2015-03-17 11:37:58 +0000 |
commit | 86ad3590d558235f9e5fb7a9ad0072c4bd98787d (patch) | |
tree | e93e108cbd4e3fb2d887a2ffb7276bad24d20cb9 /src | |
parent | 6a60e9ccada6e08a1c2edadb3940503a442922d4 (diff) |
Add ColorIndexForNumber macro replacing '& 0x07'
Makes it easier to add more colors.
Diffstat (limited to 'src')
-rw-r--r-- | src/qcommon/q_shared.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 3f4f0780..9de2d8f2 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -395,7 +395,8 @@ extern vec4_t colorDkGrey; #define COLOR_CYAN '5' #define COLOR_MAGENTA '6' #define COLOR_WHITE '7' -#define ColorIndex(c) (((c) - '0') & 0x07) +#define ColorIndexForNumber(c) ((c) & 0x07) +#define ColorIndex(c) (ColorIndexForNumber((c) - '0')) #define S_COLOR_BLACK "^0" #define S_COLOR_RED "^1" |