aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJamieson Christian2003-05-15 21:55:13 +0000
committerJamieson Christian2003-05-15 21:55:13 +0000
commit73e086fe625663a04f1b34c372ec93de440231d1 (patch)
tree40254b2b425b7b497a32cf44972fe525339b52f5 /scumm
parentf695aa388550a3cfb2a0e09811b6d16e3a5686ea (diff)
downloadscummvm-rg350-73e086fe625663a04f1b34c372ec93de440231d1.tar.gz
scummvm-rg350-73e086fe625663a04f1b34c372ec93de440231d1.tar.bz2
scummvm-rg350-73e086fe625663a04f1b34c372ec93de440231d1.zip
_saveSound implementation
svn-id: r7542
Diffstat (limited to 'scumm')
-rw-r--r--scumm/saveload.cpp10
-rw-r--r--scumm/scummvm.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 5345fccf81..5c624646ba 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -74,7 +74,7 @@ bool Scumm::saveState(int slot, bool compat, SaveFileManager *mgr) {
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 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) {
/* 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 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) {
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 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
int var120Backup;
int var98Backup;
- if (!s->isSaving()) {
+ if (!s->isSaving() && _saveSound) {
_sound->stopAllSounds();
if (_mixer) {
if (_imuseDigital) {
@@ -693,7 +693,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
}
#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);
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 34a1d935c4..489ccf5f3e 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -367,7 +367,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
tempMusic = 0;
_silentDigitalImuse = 0;
_noDigitalSamples = 0;
- _saveSound = 0;
+ _saveSound = 1;
current_cd_sound = 0;
_maxBoxVertexHeap = 0;
_boxPathVertexHeapIndex = 0;