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 | |
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
-rw-r--r-- | scumm/charset.cpp | 31 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 9 | ||||
-rw-r--r-- | scumm/string.cpp | 2 |
3 files changed, 35 insertions, 7 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) { diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 5cec8b5bc3..67a283d33e 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -451,6 +451,8 @@ void Scumm_v5::o5_actorSet() { break; case 12: /* talk color */ a->talkColor = getVarOrDirectByte(0x80); + if (_features & GF_16COLOR) + a->talkColor &= 0x0f; // FIXME break; case 13: /* name */ loadPtrToResource(rtActorName, a->number, NULL); @@ -2482,9 +2484,14 @@ void Scumm_v5::decodeParseString() { // FIXME: Store positions, this is needed for Indy3 (Grail Diary).. // I don't believe this is the correct fix, may cause other problems // later in the game. - if ((_gameId == GID_INDY3_256) || (_gameId == GID_INDY3)) { + // + // It's also needed for Loom, or the lines Bobbin + // speaks during the intro are put at position 0,0. + // In addition, Loom needs to remember the text colour. + if (_gameId == GID_INDY3_256 || _gameId == GID_INDY3 || _gameId == GID_LOOM) { _string[textSlot].t_xpos = _string[textSlot].xpos; _string[textSlot].t_ypos = _string[textSlot].ypos; + _string[textSlot].t_color = _string[textSlot].color; } _scriptPointer = _messagePtr; diff --git a/scumm/string.cpp b/scumm/string.cpp index 5602656931..adfd538cfc 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -188,7 +188,7 @@ void Scumm::CHARSET_1() { _talkDelay = _defaultTalkDelay; if (!_keepText) { - if (_features & GF_AFTER_V3) { + if (_features & GF_AFTER_V3 && _gameId != GID_LOOM) { gdi._mask_left = _string[0].xpos; gdi._mask_top = _string[0].ypos; gdi._mask_bottom = _string[0].ypos + 8; |