]> Shamusworld >> Repos - virtualjaguar/commitdiff
Minor change to allow inverse text
authorShamus Hammons <jlhamm@acm.org>
Sat, 23 Aug 2003 16:05:01 +0000 (16:05 +0000)
committerShamus Hammons <jlhamm@acm.org>
Sat, 23 Aug 2003 16:05:01 +0000 (16:05 +0000)
src/gui.cpp
src/include/gui.h

index bf4c30e941d24d5e8a743c13dc1d04199999e9a3..db683ab9c0c5b8f19c7121fe0b05e40f5c9a4e59 100644 (file)
@@ -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++;
                        }
                }
 
index 57fb8905c73213c5b0a5ab87b062ac813a49da6b..9259796c93a7d08c859fa426dcc677a0cef73719 100644 (file)
@@ -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__