Changes to some font loading in video.c to fix Olivetti M24.

This commit is contained in:
OBattler
2020-04-14 20:38:03 +02:00
parent 1b3cd8f2e9
commit 08f52c5a29

View File

@@ -935,15 +935,11 @@ loadfont(wchar_t *s, int format)
case 1: /* PC200 */
for (d = 0; d < 4; d++) {
/* There are 4 fonts in the ROM */
for (c = 0; c < 256; c++) { /* 8x14 MDA in 8x16 cell */
if (fread(&fontdatm[256*d + c][0], 1, 16, f) != 16)
fatal("loadfont(): Error reading 8x16 font in PC200 mode, c = %i\n", c);
}
for (c = 0; c < 256; c++) /* 8x14 MDA in 8x16 cell */
fread(&fontdatm[256*d + c][0], 1, 16, f);
for (c = 0; c < 256; c++) { /* 8x8 CGA in 8x16 cell */
if (fread(&fontdat[256*d + c][0], 1, 8, f) != 8)
fatal("loadfont(): Error reading 8x8 font in PC200 mode, c = %i\n", c);
if (fseek(f, 8, SEEK_CUR) == -1)
fatal("loadfont(): Error seeking in PC200 mode, c = %i\n", c);
fread(&fontdat[256*d + c][0], 1, 8, f);
fseek(f, 8, SEEK_CUR);
}
}
break;