[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,1.28,1.29 imuse.h,1.7,1.8
Pawe? Ko?odziejski
aquadran at users.sourceforge.net
Thu Oct 3 00:43:04 CEST 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv18078
Modified Files:
imuse.cpp imuse.h
Log Message:
changes in loops in imuse
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- imuse.cpp 3 Oct 2002 07:17:13 -0000 1.28
+++ imuse.cpp 3 Oct 2002 07:42:25 -0000 1.29
@@ -4866,16 +4866,23 @@
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 @@
_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 @@
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;
}
}
}
Index: imuse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- imuse.h 3 Oct 2002 07:17:14 -0000 1.7
+++ imuse.h 3 Oct 2002 07:42:25 -0000 1.8
@@ -76,7 +76,7 @@
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 {
More information about the Scummvm-git-logs
mailing list