diff options
author | Eugene Sandulenko | 2005-03-16 03:40:25 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-03-16 03:40:25 +0000 |
commit | 1febad7cc57b598299293fc5a99be5f17baeb65e (patch) | |
tree | 4915d06f0297848aef0d31fb8e7fd89437c3725e | |
parent | f86768fee8aabb448152092b95a0a0b08e59eb63 (diff) | |
download | scummvm-rg350-1febad7cc57b598299293fc5a99be5f17baeb65e.tar.gz scummvm-rg350-1febad7cc57b598299293fc5a99be5f17baeb65e.tar.bz2 scummvm-rg350-1febad7cc57b598299293fc5a99be5f17baeb65e.zip |
First attempt to fix charset colors.
svn-id: r17165
-rw-r--r-- | scumm/charset.cpp | 98 |
1 files changed, 52 insertions, 46 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 8a3ae390f8..0ad0f40b43 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -1671,65 +1671,70 @@ void CharsetRendererNut::printChar(int chr) { static byte trNESEnglishTable[] = { 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x0A, 0x07, 0x00, - 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x07, 0x00, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x00, 0x00, 0x00, 0x2F, 0x00, - 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x00, 0x00, 0x00, 0x05, 0x08, - 0x20, 0x20, 0x21, 0x60, 0x27, 0x7E, 0x2C, 0x2E, - 0x7F, 0x3F, 0x2D, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x00, 0x00, 0x00, 0x2f, 0x00, + 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x00, 0x00, 0x00, 0x05, 0x08, + 0x20, 0x20, 0x21, 0x60, 0x27, 0x7e, 0x2c, 0x2e, + 0x7f, 0x3f, 0x2d, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5E + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, + 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5e }; static byte trNESFrenchTable[] = { 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x64, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x0A, 0x07, 0x00, - 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x07, 0x00, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x15, 0x15, 0x64, 0x09, - 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x19, 0x19, 0x19, 0x2F, 0x29, - 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x1D, 0x23, 0x29, 0x05, 0x08, - 0x20, 0x20, 0x21, 0x60, 0x27, 0x7E, 0x2C, 0x2E, - 0x7F, 0x3F, 0x2D, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x19, 0x19, 0x19, 0x2f, 0x29, + 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x1d, 0x23, 0x29, 0x05, 0x08, + 0x20, 0x20, 0x21, 0x60, 0x27, 0x7e, 0x2c, 0x2e, + 0x7f, 0x3f, 0x2d, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5E + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, + 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5e }; static byte trNESSwedishTable[] = { 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x0A, 0x07, 0x00, - 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x0a, 0x07, 0x00, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x00, 0x00, 0x61, 0x00, 0x64, 0x09, - 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x62, 0x63, 0x00, 0x2F, 0x00, - 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, - 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, - 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, - 0x2C, 0x2D, 0x2E, 0x63, 0x64, 0x61, 0x05, 0x08, - 0x20, 0x20, 0x21, 0x60, 0x27, 0x7E, 0x2C, 0x2E, - 0x7F, 0x3F, 0x2D, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x62, 0x63, 0x00, 0x2f, 0x00, + 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, + 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, + 0x2c, 0x2d, 0x2e, 0x63, 0x64, 0x61, 0x05, 0x08, + 0x20, 0x20, 0x21, 0x60, 0x27, 0x7e, 0x2c, 0x2e, + 0x7f, 0x3f, 0x2d, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, - 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, - 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, - 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5E + 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, + 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, + 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5e +}; + +static byte NESColorTransition[] = { + 0x00, 0x02, 0x02, 0x03, 0x02, 0x01, 0x02, 0x03, + 0x00, 0x01, 0x02, 0x01, 0x00, 0x01, 0x00, 0x03 }; @@ -1817,7 +1822,8 @@ void CharsetRendererNES::drawBits1(const Graphics::Surface &s, byte *dst, const byte c0 = src[i]; byte c1 = src[i + 8]; for (int j = 0; j < 8; j++) - dst[j] = _vm->_NESPalette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1)] | _color; + dst[j] = _vm->_NESPalette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) | + (NESColorTransition[_color] << 2)]; dst += s.pitch; } } |