Ticket #5672: pcjr.diff

File pcjr.diff, 1.0 KB (added by eriktorbjorn, 9 years ago)

Patch against current git

  • engines/agi/sound_pcjr.cpp

    diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp
    index 319b704..fdebf16 100644
    a b int SoundGenPCJr::volumeCalc(SndGenChan *chan) {  
    219219// return 0 if it's passing more data
    220220// return -1 if it's passing nothing (end of data)
    221221int SoundGenPCJr::getNextNote(int ch, Tone *tone) {
     222        ToneChan *tpcm;
    222223        SndGenChan *chan;
    223224        const byte *data;
    224225
    int SoundGenPCJr::getNextNote(int ch, Tone *tone) {  
    228229        if (!_vm->getflag(fSoundOn))
    229230                return -1;
    230231
     232        tpcm = &_tchannel[ch];
    231233        chan = &_channel[ch];
    232234        if (!chan->avail)
    233235                return -1;
    int SoundGenPCJr::getNextNote(int ch, Tone *tone) {  
    241243                // if it's 0 then it's not going to be played
    242244                // if it's 0xFFFF then the channel data has finished.
    243245                if ((chan->duration != 0) && (chan->duration != 0xFFFF)) {
     246                        tpcm->genTypePrev = -1;
     247                        tpcm->freqCountPrev = -1;
     248
    244249                        // only tone channels dissolve
    245250                        if ((ch != 3) && (_dissolveMethod != 0))        // != noise??
    246251                                chan->dissolveCount = 0;