diff options
author | Max Horn | 2003-04-27 18:30:35 +0000 |
---|---|---|
committer | Max Horn | 2003-04-27 18:30:35 +0000 |
commit | 732d457aac9eefcdc1adb4b3b5ee5a6a2e7ea4a1 (patch) | |
tree | 2285b94ad82839475bfa744e2b29563841031b51 /scumm/charset.cpp | |
parent | dfd99bbb13c6f4859d14f26752e6a2c063603e53 (diff) | |
download | scummvm-rg350-732d457aac9eefcdc1adb4b3b5ee5a6a2e7ea4a1.tar.gz scummvm-rg350-732d457aac9eefcdc1adb4b3b5ee5a6a2e7ea4a1.tar.bz2 scummvm-rg350-732d457aac9eefcdc1adb4b3b5ee5a6a2e7ea4a1.zip |
Patch #728483: EGA LOOM: More text-drawing hackery
svn-id: r7162
Diffstat (limited to 'scumm/charset.cpp')
-rw-r--r-- | scumm/charset.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 13dab3db08..7273704847 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -181,6 +181,18 @@ void CharsetRendererOld256::printChar(int chr) { unsigned int buffer = 0, mask = 0, x = 0, y = 0; unsigned char color; + // FIXME: When playing with the original interpreter, Much of the + // text in Loom is drawn with a drop-shadow. But is it all of it, or + // just some? It's hard to tell with a black background. + bool drop_shadow = (_vm->_gameId == GID_LOOM); + int w, h; + + if (!drop_shadow) { + w = h = 8; + } else { + w = h = 9; + } + _vm->checkRange(_vm->_maxCharsets - 1, 0, _curId, "Printing with bad charset %d"); if ((vs = _vm->findVirtScreen(_top)) == NULL) @@ -199,7 +211,7 @@ void CharsetRendererOld256::printChar(int chr) { char_ptr = _fontPtr + chr * 8; dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left; - _vm->updateDirtyRect(vs->number, _left, _left + 8, _top - vs->topline, _top - vs->topline + 8, 0); + _vm->updateDirtyRect(vs->number, _left, _left + w, _top - vs->topline, _top - vs->topline + h, 0); for (y = 0; y < 8; y++) { for (x = 0; x < 8; x++) { @@ -208,19 +220,28 @@ void CharsetRendererOld256::printChar(int chr) { mask = 0x80; } color = ((buffer & mask) != 0); - if (color) + if (color) { + if (drop_shadow) + *(dest_ptr + (y + 1) * _vm->_realWidth + x + 1) = 0; *(dest_ptr + y * _vm->_realWidth + x) = _color; + } } } // FIXME + if (_left < _strLeft) + _strLeft = _left; + _left += getCharWidth(chr); - if (_left > _strRight) + if (_left > _strRight) { _strRight = _left; + if (drop_shadow) + _strRight++; + } - if (_top + 8 > _strBottom) - _strBottom = _top + 8; + if (_top + h > _strBottom) + _strBottom = _top + h; } void CharsetRendererClassic::printChar(int chr) { |