diff options
-rw-r--r-- | scumm/script_v100he.cpp | 25 | ||||
-rw-r--r-- | scumm/script_v7he.cpp | 23 |
2 files changed, 27 insertions, 21 deletions
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 298bcc4a70..e5aa8baea6 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -1623,23 +1623,30 @@ void ScummEngine_v100he::o100_roomOps() { } void ScummEngine_v100he::o100_startSound() { + byte filename[260]; + int var, value; + byte subOp = fetchScriptByte(); switch (subOp) { case 6: _heSndFlags |= 16; - pop(); + _heSndOffset = pop(); + break; + case 47: + copyScriptString(filename, sizeof(filename)); + _heSndSoundId = pop(); + if (_heSndSoundId) + debug(0, "Load sound %d from file %s\n", _heSndSoundId, filename); break; case 55: _heSndFlags |= 8; break; case 83: - { - int value = pop(); - int var = pop(); - int snd = pop(); - debug(1,"o70_startSound: case 29 (snd %d, var %d, value %d)", snd, var, value); - } + value = pop(); + var = pop(); + _heSndSoundId = pop(); + debug(0,"o100_startSound: case 29 (snd %d, var %d, value %d)", _heSndSoundId, var, value); break; case 92: debug(0, "o100_startSound (ID %d, Offset %d, Channel %d, Flags %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags); @@ -1658,8 +1665,8 @@ void ScummEngine_v100he::o100_startSound() { case 131: _heSndFlags |= 4; break; - case 132: - case 134: + case 132: // Music + case 134: // Sound _heSndSoundId = pop(); _heSndOffset = 0; _heSndSoundFreq = 11025; diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 816bdeb2b6..925dc82d3f 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -425,6 +425,8 @@ void ScummEngine_v70he::appendSubstring(int dst, int src, int srcOffs, int len) } void ScummEngine_v70he::o70_startSound() { + int var, value; + byte subOp = fetchScriptByte(); switch (subOp) { @@ -432,15 +434,17 @@ void ScummEngine_v70he::o70_startSound() { _heSndFlags |= 4; break; case 23: - { - int value = pop(); - int var = pop(); - int snd = pop(); - debug(1,"o70_startSound: case 29 (snd %d, var %d, value %d)", snd, var, value); - } + value = pop(); + var = pop(); + _heSndSoundId = pop(); + debug(0,"o70_startSound: case 29 (snd %d, var %d, value %d)", _heSndSoundId, var, value); break; + case 25: + value = pop(); + _heSndSoundId = pop(); + _sound->addSoundToQueue(_heSndSoundId, 0, 0, 8); case 56: - _heSndFlags |= 2; + _heSndFlags |= 16; break; case 164: _heSndFlags |= 2; @@ -448,26 +452,21 @@ void ScummEngine_v70he::o70_startSound() { case 224: _heSndSoundFreq = pop(); break; - case 230: _heSndChannel = pop(); break; - case 231: _heSndOffset = pop(); break; - case 232: _heSndSoundId = pop(); _heSndOffset = 0; _heSndSoundFreq = 11025; _heSndChannel = VAR(VAR_MUSIC_CHANNEL); break; - case 245: _heSndFlags |= 1; break; - case 255: debug(1, "o70_startSound (ID %d, Offset %d, Channel %d, Flags %d)", _heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags); _sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags); |