Add ColorIndexForNumber macro replacing '& 0x07'

Makes it easier to add more colors.
This commit is contained in:
Pan7 authored and Zack Middleton committed 2014-08-28 20:09:37 -05:00
1 parent eeef7cbae7
commit 18e08125dd
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -403,7 +403,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"