diff options
author | Travis Howell | 2004-06-23 09:13:25 +0000 |
---|---|---|
committer | Travis Howell | 2004-06-23 09:13:25 +0000 |
commit | 9cc7594384eabde62624d5fcda82605e5e66c5c4 (patch) | |
tree | f0b9f5108af3def1a354bad8a23e003c60b2cd14 | |
parent | c7f06142a00a625c1f3bfe76bdc2b5429ba2cdc3 (diff) | |
download | scummvm-rg350-9cc7594384eabde62624d5fcda82605e5e66c5c4.tar.gz scummvm-rg350-9cc7594384eabde62624d5fcda82605e5e66c5c4.tar.bz2 scummvm-rg350-9cc7594384eabde62624d5fcda82605e5e66c5c4.zip |
Remove HE7 check that wasn't needed and caused resource load failures.
Enable startSound code in HE7 games.
Avoid loading music resources in HE7 games, since they are unsupported at the moment.
svn-id: r14010
-rw-r--r-- | scumm/resource.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 29 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/sound.cpp | 6 |
4 files changed, 21 insertions, 17 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index beaa1b7703..5a9cd83ba8 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -578,7 +578,7 @@ void ScummEngine::ensureResourceLoaded(int type, int i) { debugC(DEBUG_RESOURCE, "ensureResourceLoaded(%s,%d)", resTypeFromId(type), i); - if ((type == rtRoom || _heversion >= 70) && i > 0x7F && _version < 7) { + if ((type == rtRoom) && i > 0x7F && _version < 7) { i = _resourceMapper[i & 0x7F]; } diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index bbad4f5746..5474e9b2c1 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -650,42 +650,41 @@ void ScummEngine_v7he::o7_startSound() { switch (op) { case 224: - // _staticVar1 = pop(); - pop(); + _staticVar1 = pop(); break; case 230: - // _staticVar2 = pop(); - pop(); + _staticVar2 = pop(); break; case 231: - // _staticVar3 = pop(); - pop(); + _staticVar3 = pop(); break; case 232: - //FIXME Ignoring extra arguments for now. - _sound->addSoundToQueue(pop()); - // _staticVar4 = pop(); - // _staticVar3 = 0; - // _staticVar1 = 11025; - // _staticVar2 = VAR(VAR_MUSIC_TIMER); + _staticVar4 = pop(); + _staticVar3 = 0; + _staticVar1 = 11025; + _staticVar2 = VAR(VAR_MUSIC_TIMER); break; case 245: - // _staticVar5 |= 1; + _staticVar5 |= 1; break; case 255: // _sound->addSoundToQueue(_staticVar4, _staticVar3, _staticVar2, _staticVar5); - // _staticVar5 = 0; + // FIXME: Music resources (Id 4000+?) are currently unsupported, + // so don't attempt to play them. + if (_staticVar4 < 4000) + _sound->addSoundToQueue(_staticVar4); + warning("o7_startSound stub (%d, %d, %d, %d)", _staticVar4, _staticVar3, _staticVar2, _staticVar5); + _staticVar5 = 0; break; default: break; } - warning("o7_startSound stub (%d)", op); } diff --git a/scumm/scumm.h b/scumm/scumm.h index 625c0823c4..206d109d95 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1037,6 +1037,7 @@ protected: int _saveSound; bool _native_mt32; int _midiDriver; // Use the MD_ values from mididrv.h + int _staticVar1, _staticVar2, _staticVar3, _staticVar4, _staticVar5; bool _copyProtection; bool _demoMode; bool _confirmExit; diff --git a/scumm/sound.cpp b/scumm/sound.cpp index f5c3338d3a..8d433ee63e 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -657,7 +657,11 @@ int Sound::isSoundRunning(int sound) const { return pollCD(); if (_vm->_features & GF_HUMONGOUS) { - if (sound == -2) { + if (sound == 10000) + // FIXME: Music resources in HE7 games are currently unsupported, + // so prevent music restart attempt + return 1; + else if (sound == -2) { return isSfxFinished(); } else if (sound == -1) { // getSoundStatus(), with a -1, will return the |