Fix for Bug [766851] ALL: MIDI fragment repeats after close ups

Adjusted default _saveSound value used by S&M (whose
value is assumed by pre-S&M games). Corrected save/load
music behavior for non-temporary saves. (Until this default
value change, the incorrect behavior would almost never
manifest itself, so existing savegames should be fine.)

svn-id: r9035
This commit is contained in:
Jamieson Christian 2003-07-15 10:16:45 +00:00
parent c2dd5afb6a
commit 44bda652ee
2 changed files with 4 additions and 4 deletions

View File

@ -130,7 +130,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) {
/* Nuke all resources */
for (i = rtFirst; i <= rtLast; i++)
if (i != rtTemp && i != rtBuffer && (i != rtSound || _saveSound))
if (i != rtTemp && i != rtBuffer && (i != rtSound || _saveSound || !compat))
for (j = 0; j < res.num[i]; j++) {
nukeResource(i, j);
res.flags[i][j] = 0;
@ -551,7 +551,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
int var120Backup;
int var98Backup;
if (!s->isSaving() && _saveSound) {
if (!s->isSaving() && (_saveSound || !_saveLoadCompatible)) {
_sound->stopAllSounds();
if (_mixer) {
if (_imuseDigital) {
@ -668,7 +668,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) {
}
}
if (_imuse && _saveSound) {
if (_imuse && (_saveSound || !_saveLoadCompatible)) {
_imuse->save_or_load(s, this);
_imuse->set_master_volume (_sound->_sound_volume_master);
_imuse->set_music_volume (_sound->_sound_volume_music);

View File

@ -393,7 +393,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
tempMusic = 0;
_silentDigitalImuse = 0;
_noDigitalSamples = 0;
_saveSound = 1;
_saveSound = 0;
memset(_extraBoxFlags, 0, sizeof(_extraBoxFlags));
memset(_scaleSlots, 0, sizeof(_scaleSlots));
_charset = NULL;