From a2f29c64b6ca441c51d6d1340907a1168c15fc7b Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Sat, 23 Aug 2003 16:05:01 +0000 Subject: [PATCH] Minor change to allow inverse text --- src/gui.cpp | 5 +++-- src/include/gui.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index bf4c30e..db683ab 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -19,7 +19,7 @@ void GUIDone(void) { } -void DrawText(int16 * screen, uint32 x, uint32 y, const char * text, ...) +void DrawText(int16 * screen, uint32 x, uint32 y, bool invert, const char * text, ...) { char string[4096]; va_list arg; @@ -39,8 +39,9 @@ void DrawText(int16 * screen, uint32 x, uint32 y, const char * text, ...) { for(uint32 xx=0; xx<8; xx++) { - if (font1[fontAddr++]) + if ((font1[fontAddr] && !invert) || (!font1[fontAddr] && invert)) *(screen + address + xx + (yy * pitch)) = 0xFE00; + fontAddr++; } } diff --git a/src/include/gui.h b/src/include/gui.h index 57fb890..9259796 100644 --- a/src/include/gui.h +++ b/src/include/gui.h @@ -7,6 +7,6 @@ #ifndef __GUI_H__ #define __GUI_H__ -void DrawText(int16 * screen, uint32 x, uint32 y, const char * text, ...); +void DrawText(int16 * screen, uint32 x, uint32 y, bool invert, const char * text, ...); #endif // __GUI_H__ -- 2.37.2