Ticket #8191: cmi-object-line.diff

File cmi-object-line.diff, 3.0 KB (added by eriktorbjorn, 21 years ago)

Patch against a March 30 CVS snapshot

  • scummvm/scumm/bundle.cpp

    diff -ur ScummVM-cvs20030330/scummvm/scumm/bundle.cpp ScummVM-cvs20030330+hack/scummvm/scumm/bundle.cpp
    old new  
    361361                        return final_size;
    362362                }
    363363        }
    364         warning("Failed finding voice %s", name);
     364        debug(2, "Failed finding voice %s", name);
    365365        return final_size;
    366366}
    367367
  • scummvm/scumm/script_v8.cpp

    diff -ur ScummVM-cvs20030330/scummvm/scumm/script_v8.cpp ScummVM-cvs20030330+hack/scummvm/scumm/script_v8.cpp
    old new  
    515515                        }
    516516                        pointer[j] = 0;
    517517
    518                         // Stop any talking that's still going on
    519                         if (_sound->_talkChannel > -1)
    520                                 _mixer->stop(_sound->_talkChannel);
     518                        int new_sound = _sound->playBundleSound(pointer);
     519                        if (new_sound != -1) {
     520                                // Stop any talking that's still going on
     521                                if (_sound->_talkChannel > -1)
     522                                        _mixer->stop(_sound->_talkChannel);
     523                                _sound->_talkChannel = new_sound;
     524                        }
    521525
    522                         _sound->_talkChannel = _sound->playBundleSound(pointer);
    523526                        _messagePtr = _transText;
    524527                }
    525528               
     
    607610                                _charset->_nextTop = _charset->_top;
    608611                        }
    609612                } while (c);
     613
     614                _blastTextQueue[i].left = _charset->_strLeft;
     615                _blastTextQueue[i].right = _charset->_strRight;
     616                _blastTextQueue[i].top = _charset->_strTop;
     617                _blastTextQueue[i].bottom = _charset->_strBottom;
    610618        }
    611619        _charset->_ignoreCharsetMask = false;
    612620}
    613621
     622void Scumm::removeBlastTexts() {
     623        int i;
     624
     625        for (i = 0; i < _blastTextQueuePos; i++) {
     626                restoreBG(_blastTextQueue[i].left, _blastTextQueue[i].top, _blastTextQueue[i].right, _blastTextQueue[i].bottom);
     627        }
     628        _blastTextQueuePos = 0;
     629}
     630
    614631void Scumm_v8::o8_mod() {
    615632        int a = pop();
    616633        push(pop() % a);
     
    16141631                // scripts. Probably a wrong push/pop somewhere. For now override to correct value.
    16151632                array = 658;
    16161633                ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
    1617                 if (!strcmp((char *)ah->data, "Saveload Page"))
     1634                if (!strcmp((char *)ah->data, "Saveload Page") || !strcmp((char *)ah->data, "Object Names"))
    16181635                        push(1);
    16191636                else
    16201637                        push(0);
  • scummvm/scumm/scumm.h

    diff -ur ScummVM-cvs20030330/scummvm/scumm/scumm.h ScummVM-cvs20030330+hack/scummvm/scumm/scumm.h
    old new  
    116116
    117117struct BlastText {
    118118        int16 xpos, ypos;
     119        int16 left, right, top, bottom;
    119120        byte color;
    120121        byte charset;
    121122        bool center;
     
    876877
    877878        void enqueueText(byte *text, int x, int y, byte color, byte charset, bool center);
    878879        void drawBlastTexts();
    879         void removeBlastTexts() { _blastTextQueuePos = 0; }
     880        void removeBlastTexts();
    880881
    881882        void enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth,
    882883                           int objectHeight, int scaleX, int scaleY, int image, int mode);