]> Shamusworld >> Repos - apple2/blobdiff - src/gui/guimisc.cpp
Beginnings of new GUI
[apple2] / src / gui / guimisc.cpp
index 5c31f51ea064fe5a732789de52da3e818759be9c..6a7af2ea72647bce868a5f5aaa2fa56454eb6403 100755 (executable)
@@ -86,6 +86,12 @@ void DrawStringTrans(SDL_Surface * screen, uint32 x, uint32 y, uint32 color, con
        SDL_Rect rect;
        rect.x = x, rect.y = y;
 
+//bleh
+uint8 r1, g1, b1, a1;
+SDL_GetRGBA(color, screen->format, &r1, &g1, &b1, &a1);
+color = SDL_MapRGBA(chr->format, r1, g1, b1, a1);
+//helb
+
        for(uint32 i=0; i<length; i++)
        {
                uint8 c = string[i];
@@ -135,6 +141,14 @@ void DrawStringOpaque(SDL_Surface * screen, uint32 x, uint32 y, uint32 fg, uint3
        SDL_Rect rect;
        rect.x = x, rect.y = y;
 
+//bleh (we have to map colors from the HW surface to the SW surface)
+uint8 r1, g1, b1, a1;
+SDL_GetRGBA(fg, screen->format, &r1, &g1, &b1, &a1);
+fg = SDL_MapRGBA(chr->format, r1, g1, b1, a1);
+SDL_GetRGBA(bg, screen->format, &r1, &g1, &b1, &a1);
+bg = SDL_MapRGBA(chr->format, r1, g1, b1, a1);
+//helb
+
        for(uint32 i=0; i<length; i++)
        {
                uint8 c = string[i];