diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 861e448..283935b 100644
a
|
b
|
int CharsetRendererClassic::getCharWidth(uint16 chr) {
|
401 | 401 | spacing++; |
402 | 402 | } |
403 | 403 | } |
404 | | |
| 404 | |
405 | 405 | } else if (chr >= 0x80) { |
406 | 406 | return _vm->_2byteWidth / 2; |
407 | 407 | } |
… |
… |
int CharsetRendererV3::getCharWidth(uint16 chr) {
|
618 | 618 | spacing = 4; |
619 | 619 | } else if (chr & 0x80) { |
620 | 620 | spacing = _vm->_2byteWidth / 2; |
621 | | } |
| 621 | } |
622 | 622 | } |
623 | 623 | |
624 | | if (!spacing) |
| 624 | if (!spacing) { |
625 | 625 | spacing = *(_widthTable + chr); |
| 626 | } |
626 | 627 | |
627 | 628 | return spacing; |
628 | 629 | } |
… |
… |
void CharsetRenderer::processTownsCharsetColors(uint8 bytesPerPixel) {
|
857 | 858 | if (_vm->_game.platform == Common::kPlatformFMTowns) { |
858 | 859 | for (int i = 0; i < (1 << bytesPerPixel); i++) { |
859 | 860 | uint8 c = _vm->_charsetColorMap[i]; |
860 | | |
| 861 | |
861 | 862 | if (c > 16) { |
862 | 863 | uint8 t = (_vm->_currentPalette[c * 3] < 32) ? 4 : 12; |
863 | 864 | t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 2 : 10); |
864 | 865 | t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 1 : 9); |
865 | 866 | c = t; |
866 | 867 | } |
867 | | |
| 868 | |
868 | 869 | if (c == 0) |
869 | 870 | c = _vm->_townsOverrideShadowColor; |
870 | | |
| 871 | |
871 | 872 | c = ((c & 0x0f) << 4) | (c & 0x0f); |
872 | 873 | _vm->_townsCharsetColorMap[i] = c; |
873 | 874 | } |
… |
… |
void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
|
920 | 921 | noSjis = true; |
921 | 922 | } |
922 | 923 | } |
923 | | |
| 924 | |
924 | 925 | if (useTownsFontRomCharacter(chr) && !noSjis) { |
925 | 926 | charPtr = 0; |
926 | 927 | _vm->_cjkChar = chr; |
927 | 928 | enableShadow(true); |
928 | | |
| 929 | |
929 | 930 | width = getCharWidth(chr); |
930 | 931 | // For whatever reason MI1 uses a different font width |
931 | 932 | // for alignment calculation and for drawing when |
… |
… |
void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
|
947 | 948 | height++; |
948 | 949 | } |
949 | 950 | } else |
950 | | #endif |
| 951 | #endif |
951 | 952 | { |
952 | 953 | uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4); |
953 | 954 | assert(charOffs < 0x14000); |
… |
… |
void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
|
1259 | 1260 | #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE |
1260 | 1261 | byte *dst3 = dst2; |
1261 | 1262 | byte *dst4 = dst2; |
1262 | | if (scale2x) { |
| 1263 | if (scale2x) { |
1263 | 1264 | dst3 = dst2 + s.pitch; |
1264 | 1265 | dst4 = dst3 + s.pitch; |
1265 | 1266 | pitch <<= 1; |
1266 | 1267 | } |
1267 | 1268 | if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 5) |
1268 | 1269 | col = _vm->_townsCharsetColorMap[1]; |
1269 | | #endif |
| 1270 | #endif |
1270 | 1271 | |
1271 | 1272 | for (y = 0; y < height && y + drawTop < s.h; y++) { |
1272 | 1273 | for (x = 0; x < width; x++) { |
… |
… |
void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
|
1287 | 1288 | if (scale2x) { |
1288 | 1289 | dst[2] = dst[3] = dst2[2] = dst2[3] = _shadowColor; |
1289 | 1290 | dst3[0] = dst4[0] = dst3[1] = dst4[1] = _shadowColor; |
1290 | | } else |
| 1291 | } else |
1291 | 1292 | #endif |
1292 | 1293 | { |
1293 | 1294 | dst[1] = dst2[0] = _shadowColor; |
1294 | 1295 | if (_shadowMode != kFMTOWNSShadowMode) |
1295 | 1296 | dst2[1] = _shadowColor; |
1296 | | } |
| 1297 | } |
1297 | 1298 | } |
1298 | 1299 | dst[0] = col; |
1299 | 1300 | |
1300 | 1301 | #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE |
1301 | 1302 | if (scale2x) |
1302 | | dst[1] = dst2[0] = dst2[1] = col; |
| 1303 | dst[1] = dst2[0] = dst2[1] = col; |
1303 | 1304 | #endif |
1304 | 1305 | } |
1305 | 1306 | } |
… |
… |
void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
|
1317 | 1318 | |
1318 | 1319 | dst += pitch; |
1319 | 1320 | dst2 += pitch; |
1320 | | #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE |
| 1321 | #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE |
1321 | 1322 | dst3 += pitch; |
1322 | 1323 | dst4 += pitch; |
1323 | 1324 | #endif |