4 // Graphical User Interface support
22 void DrawText(int16 * screen, uint32 x, uint32 y, const char * text, ...)
28 vsprintf(string, text, arg);
31 uint32 pitch = TOMGetSDLScreenPitch() / 2; // Returns pitch in bytes but we need words...
32 uint32 length = strlen(string), address = x + (y * pitch);
34 for(uint32 i=0; i<length; i++)
36 uint32 fontAddr = (uint32)string[i] * 64;
38 for(uint32 yy=0; yy<8; yy++)
40 for(uint32 xx=0; xx<8; xx++)
42 if (font1[fontAddr++])
43 *(screen + address + xx + (yy * pitch)) = 0xFE00;