Ticket #8202: loom-text.diff

File loom-text.diff, 3.6 KB (added by eriktorbjorn, 21 years ago)

Patch against an April 26 CVS snapshot

  • scummvm/scumm/charset.cpp

    diff -ur ScummVM-cvs20030426/scummvm/scumm/charset.cpp ScummVM-cvs20030426+hack/scummvm/scumm/charset.cpp
    old new  
    181181        unsigned int buffer = 0, mask = 0, x = 0, y = 0;
    182182        unsigned char color;
    183183
     184        // FIXME: When playing with the original interpreter, Much of the
     185        // text in Loom is drawn with a drop-shadow. But is it all of it, or
     186        // just some? It's hard to tell with a black background.
     187        bool drop_shadow = (_vm->_gameId == GID_LOOM);
     188        int w, h;
     189
     190        if (!drop_shadow) {
     191                w = h = 8;
     192        } else {
     193                w = h = 9;
     194        }
     195       
    184196        _vm->checkRange(_vm->_maxCharsets - 1, 0, _curId, "Printing with bad charset %d");
    185197
    186198        if ((vs = _vm->findVirtScreen(_top)) == NULL)
     
    199211
    200212        char_ptr = _fontPtr + chr * 8;
    201213        dest_ptr = vs->screenPtr + vs->xstart + (_top - vs->topline) * _vm->_realWidth + _left;
    202         _vm->updateDirtyRect(vs->number, _left, _left + 8, _top - vs->topline, _top - vs->topline + 8, 0);
     214        _vm->updateDirtyRect(vs->number, _left, _left + w, _top - vs->topline, _top - vs->topline + h, 0);
    203215
    204216        for (y = 0; y < 8; y++) {
    205217                for (x = 0; x < 8; x++) {
     
    208220                                mask = 0x80;
    209221                        }
    210222                        color = ((buffer & mask) != 0);
    211                         if (color)
     223                        if (color) {
     224                                if (drop_shadow)
     225                                        *(dest_ptr + (y + 1) * _vm->_realWidth + x + 1) = 0;
    212226                                *(dest_ptr + y * _vm->_realWidth + x) = _color;
     227                        }
    213228                }
    214229        }
    215230
    216231        // FIXME
     232        if (_left < _strLeft)
     233                _strLeft = _left;
     234
    217235        _left += getCharWidth(chr);
    218236
    219         if (_left > _strRight)
     237        if (_left > _strRight) {
    220238                _strRight = _left;
     239                if (drop_shadow)
     240                        _strRight++;
     241        }
    221242
    222         if (_top + 8 > _strBottom)
    223                 _strBottom = _top + 8;
     243        if (_top + h > _strBottom)
     244                _strBottom = _top + h;
    224245}
    225246
    226247void CharsetRendererClassic::printChar(int chr) {
  • scummvm/scumm/script_v5.cpp

    diff -ur ScummVM-cvs20030426/scummvm/scumm/script_v5.cpp ScummVM-cvs20030426+hack/scummvm/scumm/script_v5.cpp
    old new  
    451451                        break;
    452452                case 12:                                                                                /* talk color */
    453453                        a->talkColor = getVarOrDirectByte(0x80);
     454                        if (_features & GF_16COLOR)
     455                                a->talkColor &= 0x0f;   // FIXME
    454456                        break;
    455457                case 13:                                                                                /* name */
    456458                        loadPtrToResource(rtActorName, a->number, NULL);
     
    24942496                        // FIXME: Store positions, this is needed for Indy3 (Grail Diary)..
    24952497                        // I don't believe this is the correct fix, may cause other problems
    24962498                        // later in the game.
    2497                         if (_gameId == GID_INDY3_256) {
     2499                        //
     2500                        // It's also needed for Loom, or the lines Bobbin
     2501                        // speaks during the intro are put at position 0,0.
     2502                        // In addition, Loom needs to remember the text colour.
     2503                        if (_gameId == GID_INDY3_256 || _gameId == GID_LOOM) {
    24982504                                _string[textSlot].t_xpos = _string[textSlot].xpos;
    24992505                                _string[textSlot].t_ypos = _string[textSlot].ypos;
     2506                                _string[textSlot].t_color = _string[textSlot].color;
    25002507                        }
    25012508
    25022509                        _scriptPointer = _messagePtr;
  • scummvm/scumm/string.cpp

    diff -ur ScummVM-cvs20030426/scummvm/scumm/string.cpp ScummVM-cvs20030426+hack/scummvm/scumm/string.cpp
    old new  
    188188        _talkDelay = _defaultTalkDelay;
    189189
    190190        if (!_keepText) {
    191                 if (_features & GF_AFTER_V3) {
     191                if (_features & GF_AFTER_V3 && _gameId != GID_LOOM) {
    192192                        gdi._mask_left = _string[0].xpos;
    193193                        gdi._mask_top = _string[0].ypos;
    194194                        gdi._mask_bottom = _string[0].ypos + 8;