aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/resource.cpp2
-rw-r--r--scumm/script_v7he.cpp29
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/sound.cpp6
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