mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 16:11:23 +00:00
- use correct mapping for IBM437’s lower characters
For use on text screens these need to be mapped to the printable characters they represent on screen, not the control characters of ASCII.
This commit is contained in:
parent
99d98cf79d
commit
608b387e04
2 changed files with 32 additions and 46 deletions
|
@ -81,37 +81,37 @@ const RgbQuad TextModePalette[16] =
|
||||||
|
|
||||||
static const uint16_t IBM437ToUnicode[] = {
|
static const uint16_t IBM437ToUnicode[] = {
|
||||||
0x0000, //#NULL
|
0x0000, //#NULL
|
||||||
0x0001, //#START OF HEADING
|
0x263a, //#START OF HEADING
|
||||||
0x0002, //#START OF TEXT
|
0x263B, //#START OF TEXT
|
||||||
0x0003, //#END OF TEXT
|
0x2665, //#END OF TEXT
|
||||||
0x0004, //#END OF TRANSMISSION
|
0x2666, //#END OF TRANSMISSION
|
||||||
0x0005, //#ENQUIRY
|
0x2663, //#ENQUIRY
|
||||||
0x0006, //#ACKNOWLEDGE
|
0x2660, //#ACKNOWLEDGE
|
||||||
0x0007, //#BELL
|
0x2022, //#BELL
|
||||||
0x0008, //#BACKSPACE
|
0x25d8, //#BACKSPACE
|
||||||
0x0009, //#HORIZONTAL TABULATION
|
0x25cb, //#HORIZONTAL TABULATION
|
||||||
0x000a, //#LINE FEED
|
0x25d9, //#LINE FEED
|
||||||
0x000b, //#VERTICAL TABULATION
|
0x2642, //#VERTICAL TABULATION
|
||||||
0x000c, //#FORM FEED
|
0x2640, //#FORM FEED
|
||||||
0x000d, //#CARRIAGE RETURN
|
0x266a, //#CARRIAGE RETURN
|
||||||
0x000e, //#SHIFT OUT
|
0x266b, //#SHIFT OUT
|
||||||
0x000f, //#SHIFT IN
|
0x263c, //#SHIFT IN
|
||||||
0x0010, //#DATA LINK ESCAPE
|
0x25ba, //#DATA LINK ESCAPE
|
||||||
0x0011, //#DEVICE CONTROL ONE
|
0x25c4, //#DEVICE CONTROL ONE
|
||||||
0x0012, //#DEVICE CONTROL TWO
|
0x2195, //#DEVICE CONTROL TWO
|
||||||
0x0013, //#DEVICE CONTROL THREE
|
0x203c, //#DEVICE CONTROL THREE
|
||||||
0x0014, //#DEVICE CONTROL FOUR
|
0x00b6, //#DEVICE CONTROL FOUR
|
||||||
0x0015, //#NEGATIVE ACKNOWLEDGE
|
0x00a7, //#NEGATIVE ACKNOWLEDGE
|
||||||
0x0016, //#SYNCHRONOUS IDLE
|
0x25ac, //#SYNCHRONOUS IDLE
|
||||||
0x0017, //#END OF TRANSMISSION BLOCK
|
0x21ab, //#END OF TRANSMISSION BLOCK
|
||||||
0x0018, //#CANCEL
|
0x2191, //#CANCEL
|
||||||
0x0019, //#END OF MEDIUM
|
0x2193, //#END OF MEDIUM
|
||||||
0x001a, //#SUBSTITUTE
|
0x2192, //#SUBSTITUTE
|
||||||
0x001b, //#ESCAPE
|
0x2190, //#ESCAPE
|
||||||
0x001c, //#FILE SEPARATOR
|
0x221f, //#FILE SEPARATOR
|
||||||
0x001d, //#GROUP SEPARATOR
|
0x2194, //#GROUP SEPARATOR
|
||||||
0x001e, //#RECORD SEPARATOR
|
0x25b2, //#RECORD SEPARATOR
|
||||||
0x001f, //#UNIT SEPARATOR
|
0x25bc, //#UNIT SEPARATOR
|
||||||
0x0020, //#SPACE
|
0x0020, //#SPACE
|
||||||
0x0021, //#EXCLAMATION MARK
|
0x0021, //#EXCLAMATION MARK
|
||||||
0x0022, //#QUOTATION MARK
|
0x0022, //#QUOTATION MARK
|
||||||
|
@ -207,7 +207,7 @@ static const uint16_t IBM437ToUnicode[] = {
|
||||||
0x007c, //#VERTICAL LINE
|
0x007c, //#VERTICAL LINE
|
||||||
0x007d, //#RIGHT CURLY BRACKET
|
0x007d, //#RIGHT CURLY BRACKET
|
||||||
0x007e, //#TILDE
|
0x007e, //#TILDE
|
||||||
0x007f, //#DELETE
|
0x2302, //#DELETE
|
||||||
0x00c7, //#LATIN CAPITAL LETTER C WITH CEDILLA
|
0x00c7, //#LATIN CAPITAL LETTER C WITH CEDILLA
|
||||||
0x00fc, //#LATIN SMALL LETTER U WITH DIAERESIS
|
0x00fc, //#LATIN SMALL LETTER U WITH DIAERESIS
|
||||||
0x00e9, //#LATIN SMALL LETTER E WITH ACUTE
|
0x00e9, //#LATIN SMALL LETTER E WITH ACUTE
|
||||||
|
|
|
@ -255,20 +255,6 @@ int FStartupTexture::CopyPixels(FBitmap *bmp, int conversion)
|
||||||
{
|
{
|
||||||
FileData lump = fileSystem.ReadFile (SourceLump);
|
FileData lump = fileSystem.ReadFile (SourceLump);
|
||||||
const uint8_t *source = (const uint8_t *)lump.GetMem();
|
const uint8_t *source = (const uint8_t *)lump.GetMem();
|
||||||
uint32_t pindex[16];
|
|
||||||
|
|
||||||
// Initialize the bitmap palette.
|
|
||||||
for (int i = 0; i < 16; ++i)
|
|
||||||
{
|
|
||||||
PalEntry pe;
|
|
||||||
pe.r = source[i * 3 + 0];
|
|
||||||
pe.g = source[i * 3 + 1];
|
|
||||||
pe.b = source[i * 3 + 2];
|
|
||||||
pe.a = 63;
|
|
||||||
// Convert from 6-bit per component to 8-bit per component.
|
|
||||||
pe.d= (pe.d << 2) | ((pe.d >> 4) & 0x03030303);
|
|
||||||
pindex[i] = pe;
|
|
||||||
}
|
|
||||||
PlanarToChunky((uint32_t*)bmp->GetPixels(), source + 48, startuppalette32, Width, Height);
|
PlanarToChunky((uint32_t*)bmp->GetPixels(), source + 48, startuppalette32, Width, Height);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue