Returns the character attribute for the given color.
| 4423 | |
| 4424 | // Returns the character attribute for the given color. |
| 4425 | static WORD GetColorAttribute(GTestColor color) { |
| 4426 | switch (color) { |
| 4427 | case COLOR_RED: return FOREGROUND_RED; |
| 4428 | case COLOR_GREEN: return FOREGROUND_GREEN; |
| 4429 | case COLOR_YELLOW: return FOREGROUND_RED | FOREGROUND_GREEN; |
| 4430 | default: return 0; |
| 4431 | } |
| 4432 | } |
| 4433 | |
| 4434 | static int GetBitOffset(WORD color_mask) { |
| 4435 | if (color_mask == 0) return 0; |