diff options
Diffstat (limited to 'engines/scumm/script_v5.cpp')
-rw-r--r-- | engines/scumm/script_v5.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 556f5b0af1..39e691c891 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -29,6 +29,7 @@ #include "scumm/scumm_v3.h" #include "scumm/scumm_v5.h" #include "scumm/sound.h" +#include "scumm/player_towns.h" #include "scumm/util.h" #include "scumm/verbs.h" @@ -1595,21 +1596,18 @@ void ScummEngine_v5::o5_resourceRoutines() { debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number); break; case 35: - // TODO: Might be used to set CD volume in FM-TOWNS Loom - foo = getVarOrDirectByte(PARAM_2); - debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number); + if (_townsPlayer) + _townsPlayer->setVolumeCD(getVarOrDirectByte(PARAM_2), resid); break; case 36: - // TODO: Sets the loudness of a sound resource. Used in Indy3 and Zak. foo = getVarOrDirectByte(PARAM_2); bar = fetchScriptByte(); - debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number); + if (_townsPlayer) + _townsPlayer->setSoundVolume(resid, foo, bar); break; case 37: - // TODO: Sets the pitch of a sound resource (pitch = foo - center semitones. - // "center" is at 0x32 in the sfx resource (always 0x3C in zak256, but sometimes different in Indy3). - foo = getVarOrDirectByte(PARAM_2); - debug(0, "o5_resourceRoutines %d not yet handled (script %d)", op, vm.slot[_currentScript].number); + if (_townsPlayer) + _townsPlayer->setSoundNote(resid, getVarOrDirectByte(PARAM_2)); break; default: @@ -1981,6 +1979,7 @@ void ScummEngine_v5::o5_startMusic() { break; case 0xFF: // TODO: Might return current CD volume in FM-TOWNS Loom. See also bug #805691. + result = _townsPlayer->getCurrentCdaVolume(); break; default: // TODO: return track length in seconds. We'll have to extend Sound and OSystem for this. |