#include "sysconfig.h" #include "sysdeps.h" #include "statusline.h" #include "xwin.h" static const uae_u8 ldp_font[][5] = { { 0x3e, 0x51, 0x49, 0x45, 0x3e }, { 0x00, 0x42, 0x7f, 0x40, 0x00 }, { 0x42, 0x61, 0x51, 0x49, 0x46 }, { 0x21, 0x41, 0x45, 0x4b, 0x31 }, { 0x18, 0x14, 0x12, 0x7f, 0x10 }, { 0x27, 0x45, 0x45, 0x45, 0x39 }, { 0x3c, 0x4a, 0x49, 0x49, 0x30 }, { 0x01, 0x71, 0x09, 0x05, 0x03 }, { 0x36, 0x49, 0x49, 0x49, 0x36 }, { 0x06, 0x49, 0x49, 0x29, 0x1e }, { 0x7e, 0x11, 0x11, 0x11, 0x7e }, { 0x7f, 0x49, 0x49, 0x49, 0x36 }, { 0x3e, 0x41, 0x41, 0x41, 0x22 }, { 0x7f, 0x41, 0x41, 0x22, 0x1c }, { 0x7f, 0x49, 0x49, 0x49, 0x41 }, { 0x7f, 0x09, 0x09, 0x09, 0x01 }, { 0x3e, 0x41, 0x49, 0x49, 0x7a }, { 0x7f, 0x08, 0x08, 0x08, 0x7f }, { 0x00, 0x41, 0x7f, 0x41, 0x00 }, { 0x20, 0x40, 0x41, 0x3f, 0x01 }, { 0x7f, 0x08, 0x14, 0x22, 0x41 }, { 0x7f, 0x40, 0x40, 0x40, 0x40 }, { 0x7f, 0x02, 0x0c, 0x02, 0x7f }, { 0x7f, 0x04, 0x08, 0x10, 0x7f }, { 0x3e, 0x41, 0x41, 0x41, 0x3e }, { 0x7f, 0x09, 0x09, 0x09, 0x06 }, { 0x3e, 0x41, 0x51, 0x21, 0x5e }, { 0x7f, 0x09, 0x19, 0x29, 0x46 }, { 0x46, 0x49, 0x49, 0x49, 0x31 }, { 0x01, 0x01, 0x7f, 0x01, 0x01 }, { 0x3f, 0x40, 0x40, 0x40, 0x3f }, { 0x1f, 0x20, 0x40, 0x20, 0x1f }, { 0x3f, 0x40, 0x38, 0x40, 0x3f }, { 0x63, 0x14, 0x08, 0x14, 0x63 }, { 0x07, 0x08, 0x70, 0x08, 0x07 }, { 0x61, 0x51, 0x49, 0x45, 0x43 } }; static const uae_u8 *glyph(char ch) { if (ch >= '0' && ch <= '9') return ldp_font[ch - '0']; if (ch >= 'a' && ch <= 'z') ch -= 'a' - 'A'; if (ch >= 'A' && ch <= 'Z') return ldp_font[10 + ch - 'A']; return NULL; } void ldp_render(const char *text, int len, uae_u8 *buf, struct vidbuffer *vd, int dx, int dy, int mx, int my) { const int bpp = vd->pixbytes; for (int i = 0; i < len; i++) { const uae_u8 *bits = glyph(text[i]); if (bits) { for (int x = 0; x < 5; x++) { for (int y = 0; y < 7; y++) { if (!(bits[x] & (1 << y))) continue; for (int yy = 0; yy < my; yy++) { const int py = dy + y * my + yy; if (py < 0 || py >= vd->inheight) continue; for (int xx = 0; xx < mx; xx++) { const int px = dx + x * mx + xx; if (px < 0 || px >= vd->inwidth) continue; memset(buf + py * vd->rowbytes + px * bpp, 0xff, bpp); } } } } } dx += 6 * mx; } }