[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.147,2.148 saveload.cpp,1.67,1.68

Jamieson Christian jamieson630 at users.sourceforge.net
Thu May 15 14:56:05 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9029/scummvm/scumm

Modified Files:
	scummvm.cpp saveload.cpp 
Log Message:
_saveSound implementation

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.147
retrieving revision 2.148
diff -u -d -r2.147 -r2.148
--- scummvm.cpp	15 May 2003 20:34:42 -0000	2.147
+++ scummvm.cpp	15 May 2003 21:55:13 -0000	2.148
@@ -367,7 +367,7 @@
 	tempMusic = 0;
 	_silentDigitalImuse = 0;
 	_noDigitalSamples = 0;
-	_saveSound = 0;
+	_saveSound = 1;
 	current_cd_sound = 0;
 	_maxBoxVertexHeap = 0;
 	_boxPathVertexHeapIndex = 0;

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- saveload.cpp	13 May 2003 23:42:40 -0000	1.67
+++ saveload.cpp	15 May 2003 21:55:13 -0000	1.68
@@ -74,7 +74,7 @@
 	Serializer ser(out, true, CURRENT_VER);
 	saveOrLoad(&ser, CURRENT_VER);
 #ifdef __PALM_OS__
-	if (_imuse) {	// moved here to prevent stack overflow on palmos
+	if (_imuse && _saveSound) {	// moved here to prevent stack overflow on palmos
 		_imuse->save_or_load(&ser, this);
 		_imuse->set_master_volume (_sound->_sound_volume_master);
 		_imuse->set_music_volume (_sound->_sound_volume_music);
@@ -136,7 +136,7 @@
 
 	/* Nuke all resources */
 	for (i = rtFirst; i <= rtLast; i++)
-		if (i != rtTemp && i != rtBuffer)
+		if (i != rtTemp && i != rtBuffer && (i != rtSound || _saveSound))
 			for (j = 0; j < res.num[i]; j++) {
 				nukeResource(i, j);
 				res.flags[i][j] = 0;
@@ -150,7 +150,7 @@
 	Serializer ser(out, false, hdr.ver);
 	saveOrLoad(&ser, hdr.ver);
 #ifdef __PALM_OS__
-	if (_imuse) {	// moved here to prevent stack overflow on palmos
+	if (_imuse && _saveSound) {	// moved here to prevent stack overflow on palmos
 		_imuse->save_or_load(&ser, this);
 		_imuse->set_master_volume (_sound->_sound_volume_master);
 		_imuse->set_music_volume (_sound->_sound_volume_music);
@@ -586,7 +586,7 @@
 	int var120Backup;
 	int var98Backup;
 
-	if (!s->isSaving()) {
+	if (!s->isSaving() && _saveSound) {
 		_sound->stopAllSounds();
 		if (_mixer) {
 			if (_imuseDigital) {
@@ -693,7 +693,7 @@
 	}
 	
 #ifndef __PALM_OS__// moved to ::loadState/saveState to prevent stack overflow on palmos
-	if (_imuse) {
+	if (_imuse && _saveSound) {
 		_imuse->save_or_load(s, this);
 		_imuse->set_master_volume (_sound->_sound_volume_master);
 		_imuse->set_music_volume (_sound->_sound_volume_music);





More information about the Scummvm-git-logs mailing list