Ticket #8163: talk-frequency.diff

File talk-frequency.diff, 3.4 KB (added by eriktorbjorn, 18 years ago)

Patch against a January 20 CVS snapshot

  • scummvm/scumm/actor.cpp

    diff -ur ScummVM-cvs20030120/scummvm/scumm/actor.cpp ScummVM-cvs20030120+hack/scummvm/scumm/actor.cpp
    old new  
    4141                y = 0;
    4242                facing = 180;
    4343                newDirection = 180;
     44                talkFrequency = 256;
    4445        } else if (mode == 2) {
    4546                facing = 180;
    4647                newDirection = 180;
  • scummvm/scumm/actor.h

    diff -ur ScummVM-cvs20030120/scummvm/scumm/actor.h ScummVM-cvs20030120+hack/scummvm/scumm/actor.h
    old new  
    7777        uint16 costume;
    7878        byte room;
    7979        byte talkColor;
     80        int talkFrequency;
    8081        byte scalex, scaley;
    8182        byte charset;
    8283        int16 newDirection;
  • scummvm/scumm/saveload.cpp

    diff -ur ScummVM-cvs20030120/scummvm/scumm/saveload.cpp ScummVM-cvs20030120+hack/scummvm/scumm/saveload.cpp
    old new  
    247247                MKLINE(Actor, costume, sleUint16, VER_V8),
    248248                MKLINE(Actor, room, sleByte, VER_V8),
    249249                MKLINE(Actor, talkColor, sleByte, VER_V8),
     250                MKLINE(Actor, talkFrequency, sleInt16, VER_V16),
    250251                MKLINE(Actor, scalex, sleByte, VER_V8),
    251252                MKLINE(Actor, scaley, sleByte, VER_V8),
    252253                MKLINE(Actor, charset, sleByte, VER_V8),
  • scummvm/scumm/saveload.h

    diff -ur ScummVM-cvs20030120/scummvm/scumm/saveload.h ScummVM-cvs20030120+hack/scummvm/scumm/saveload.h
    old new  
    3434        VER_V12,
    3535        VER_V13,
    3636        VER_V14,
    37         VER_V15
     37        VER_V15,
     38        VER_V16
    3839};
    3940
    40 #define CURRENT_VER VER_V15
     41#define CURRENT_VER VER_V16
    4142
    4243
    4344// To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,
  • scummvm/scumm/script_v8.cpp

    diff -ur ScummVM-cvs20030120/scummvm/scumm/script_v8.cpp ScummVM-cvs20030120+hack/scummvm/scumm/script_v8.cpp
    old new  
    11731173                warning("o8_actorOps: setActorVolume(%d) not implemented", i);
    11741174                break;
    11751175        case 0x88:              // SO_ACTOR_FREQUENCY Set frequency of actor speech
    1176                 // TODO - implement this!
    1177                 i = pop();
    1178                 if (i != 256)   // De-verbosed: 256 is the default frequency so don't warn on it
    1179                         warning("o8_actorOps: setActorFrequency(%d) not implemented", i);
     1176                a->talkFrequency = pop();
    11801177                break;
    11811178        case 0x89:              // SO_ACTOR_PAN
    11821179                // TODO - implement this!
  • scummvm/scumm/sound.cpp

    diff -ur ScummVM-cvs20030120/scummvm/scumm/sound.cpp ScummVM-cvs20030120+hack/scummvm/scumm/sound.cpp
    old new  
    12171217       
    12181218        byte * final = (byte *)malloc(size);
    12191219        memcpy(final, ptr, size);
     1220
     1221        if (_scumm->_actorToPrintStrFor != 0xFF && _scumm->_actorToPrintStrFor != 0) {
     1222                Actor *a = _scumm->derefActorSafe(_scumm->_actorToPrintStrFor, "playBundleSound");
     1223                if (a)
     1224                        rate = (rate * a->talkFrequency) / 256;
     1225        }
     1226       
    12201227        if (bits == 8) {
    12211228                return _scumm->_mixer->playRaw(NULL, final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
    12221229        } else if (bits == 16){