diff options
author | Paweł Kołodziejski | 2002-10-03 07:42:25 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2002-10-03 07:42:25 +0000 |
commit | 830dfe090f6b455fc5e3db8e20311ae8ccec7619 (patch) | |
tree | fede548c2b90aca0a3d2db532536bc730a0ab86d /scumm | |
parent | aeaad5169e45f542ab42ff5926f935e0f1cf6965 (diff) | |
download | scummvm-rg350-830dfe090f6b455fc5e3db8e20311ae8ccec7619.tar.gz scummvm-rg350-830dfe090f6b455fc5e3db8e20311ae8ccec7619.tar.bz2 scummvm-rg350-830dfe090f6b455fc5e3db8e20311ae8ccec7619.zip |
changes in loops in imuse
svn-id: r5082
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse.cpp | 16 | ||||
-rw-r--r-- | scumm/imuse.h | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index 46435eace3..b5ab8176e3 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -4866,16 +4866,23 @@ void IMuseDigital::handler() { continue; } + if ((_channel[l]._jump[0]._numLoops == 0) && (_channel[l]._isLoop == true)) { + _channel[l]._isLoop = false; + } + uint32 new_size = _channel[l]._mixerSize; uint32 mixer_size = new_size; - if(_channel[l]._isLoop == false) { + if (_channel[l]._isLoop == false) { if (_channel[l]._offset + _channel[l]._mixerSize > _channel[l]._size) { new_size = _channel[l]._size - _channel[l]._offset; _channel[l]._toBeRemoved = true; mixer_size = new_size; } } else { + if (_channel[l]._jump[0]._numLoops != 500) { + _channel[l]._jump[0]._numLoops--; + } if (_channel[l]._offset + _channel[l]._mixerSize >= _channel[l]._jump[0]._offset) { new_size = _channel[l]._jump[0]._offset - _channel[l]._offset; } @@ -5008,7 +5015,7 @@ void IMuseDigital::startSound(int sound) { _channel[l]._jump[_channel[l]._numJumps]._offset = READ_BE_UINT32(ptr); ptr += 4; _channel[l]._jump[_channel[l]._numJumps]._dest = READ_BE_UINT32(ptr); ptr += 4; _channel[l]._jump[_channel[l]._numJumps]._id = READ_BE_UINT32(ptr); ptr += 4; - _channel[l]._jump[_channel[l]._numJumps]._unk = READ_BE_UINT32(ptr); ptr += 4; + _channel[l]._jump[_channel[l]._numJumps]._numLoops = READ_BE_UINT32(ptr); ptr += 4; _channel[l]._isLoop = true; _channel[l]._numJumps++; break; @@ -5082,10 +5089,7 @@ void IMuseDigital::stopSound(int sound) { debug(1, "IMuseDigital::stopSound(%d)", sound); for (int32 l = 0; l < MAX_DIGITAL_CHANNELS; l++) { if ((_channel[l]._idSound == sound) && (_channel[l]._used == true)) { - if (_channel[l]._isLoop == false) - _channel[l]._toBeRemoved = true; - else - _channel[l]._isLoop = false; + _channel[l]._toBeRemoved = true; } } } diff --git a/scumm/imuse.h b/scumm/imuse.h index 3670a90342..9143cf7dd8 100644 --- a/scumm/imuse.h +++ b/scumm/imuse.h @@ -76,7 +76,7 @@ private: uint32 _offset; // jump position uint32 _dest; // jump to uint32 _id; // id of jump - uint32 _unk; // allmost 500 except one value: 2 + uint32 _numLoops; // allmost 500 except one value: 2 }; struct channel { |