aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2010-08-18 21:38:43 +0000
committerFlorian Kagerer2010-08-18 21:38:43 +0000
commit29a5c6a45b90e64cf5d618da4cdcd6e6da3425fb (patch)
tree16a964ac2f849c71399028e3debaf0faef45b447 /engines/scumm/scumm.cpp
parentc04d3e46899194af3558f611af634dc7124ab7c2 (diff)
downloadscummvm-rg350-29a5c6a45b90e64cf5d618da4cdcd6e6da3425fb.tar.gz
scummvm-rg350-29a5c6a45b90e64cf5d618da4cdcd6e6da3425fb.tar.bz2
scummvm-rg350-29a5c6a45b90e64cf5d618da4cdcd6e6da3425fb.zip
SCUMM/FM-TOWNS: start rewriting audio code
- Start rewriting audio code for FM-TOWNS versions of Loom, Indy3 and Monkey Island 1 using the recently added code in towns_audio.cpp (Zak should work the same way, but I can't test, since I don't own that one). - All sound types (pcm, euphony and cd audio) now support volume and balance control (e.g. try walking into/out of the kitchen and opening/closing the door in the Scumm Bar in Monkey Island 1 or walking into/out of the circus tent). - Pcm sounds now support proper loop start/end and note offsets (e.g. try out the hammer sound in the forge in LOOM for example). - some other minor improvements - The FM-Towns versions of Indy 4 and Monkey Island 2 are not affected. I don't have Monkey Island 2, but I presume that it will work like Indy 4. Adding support for these will be a separate task, since they work quite differently. svn-id: r52198
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 6e3815d314..46708b3c4f 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -48,6 +48,7 @@
#include "scumm/imuse_digi/dimuse.h"
#include "scumm/smush/smush_mixer.h"
#include "scumm/smush/smush_player.h"
+#include "scumm/player_towns.h"
#include "scumm/insane/insane.h"
#include "scumm/he/animation_he.h"
#include "scumm/he/intern_he.h"
@@ -146,6 +147,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_imuse = NULL;
_imuseDigital = NULL;
_musicEngine = NULL;
+ _townsPlayer = NULL;
_verbs = NULL;
_objs = NULL;
_sound = NULL;
@@ -1757,6 +1759,10 @@ void ScummEngine::setupMusic(int midi) {
_musicEngine = new Player_V2CMS(this, _mixer);
} else if (_game.platform == Common::kPlatform3DO && _game.heversion <= 62) {
// 3DO versions use digital music and sound samples.
+ } else if (_game.platform == Common::kPlatformFMTowns && (_game.version == 3 || _game.id == GID_MONKEY)) {
+ _musicEngine = _townsPlayer = new Player_Towns(this, _mixer);
+ if (!_townsPlayer->init())
+ error("Failed to initialize FM-Towns audio driver.");
} else if (_game.version >= 3 && _game.heversion <= 62) {
MidiDriver *nativeMidiDriver = 0;
MidiDriver *adlibMidiDriver = 0;
@@ -1806,6 +1812,10 @@ void ScummEngine::syncSoundSettings() {
_musicEngine->setMusicVolume(soundVolumeMusic);
}
+ if (_townsPlayer) {
+ _townsPlayer->setSfxVolume(soundVolumeSfx);
+ }
+
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSfx);
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech);