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 -2
View File
@@ -583,8 +583,8 @@ void Con_DrawNotify (void)
if ( ( text[x] & 0xff ) == ' ' ) {
continue;
}
if ( ( (text[x]>>8)&7 ) != currentColor ) {
currentColor = (text[x]>>8)&7;
if ( ColorIndexForNumber( text[x]>>8 ) != currentColor ) {
currentColor = ColorIndexForNumber( text[x]>>8 );
re.SetColor( g_color_table[currentColor] );
}
SCR_DrawSmallChar( cl_conXOffset->integer + con.xadjust + (x+1)*SMALLCHAR_WIDTH, v, text[x] & 0xff );