diff options
author | Max Horn | 2008-09-01 17:46:53 +0000 |
---|---|---|
committer | Max Horn | 2008-09-01 17:46:53 +0000 |
commit | 358c314381cfa8c0bcc3fe6398f02e7a2b15029c (patch) | |
tree | 674d0b2a4e21b9a53639b15db4cf106a2b284582 /engines/agos/agos.cpp | |
parent | 42a5aa567b7bf0e8d834dff9d5313fd1e49e3c74 (diff) | |
parent | 852bc9dbb750b9995d31e70f4158c97d3758c46f (diff) | |
download | scummvm-rg350-358c314381cfa8c0bcc3fe6398f02e7a2b15029c.tar.gz scummvm-rg350-358c314381cfa8c0bcc3fe6398f02e7a2b15029c.tar.bz2 scummvm-rg350-358c314381cfa8c0bcc3fe6398f02e7a2b15029c.zip |
Merging more of the GSoC 2008 RTL branch: AGOS
svn-id: r34243
Diffstat (limited to 'engines/agos/agos.cpp')
-rw-r--r-- | engines/agos/agos.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index a9fd204d73..7d03156bb6 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -97,8 +97,6 @@ AGOSEngine::AGOSEngine(OSystem *syst) _vc_get_out_of_code = 0; _gameOffsetsPtr = 0; - _quit = false; - _debugger = 0; _gameFile = 0; @@ -550,6 +548,7 @@ int AGOSEngine::init() { // Setup mixer _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); if ((getGameType() == GType_SIMON2 && getPlatform() == Common::kPlatformWindows) || (getGameType() == GType_SIMON1 && getPlatform() == Common::kPlatformWindows) || @@ -574,7 +573,7 @@ int AGOSEngine::init() { if (ret) warning("MIDI Player init failed: \"%s\"", _midi.getErrorName (ret)); - _midi.setVolume(ConfMan.getInt("music_volume")); + _midi.setVolume(ConfMan.getInt("music_volume"), ConfMan.getInt("sfx_volume")); _midiEnabled = true; @@ -952,7 +951,7 @@ void AGOSEngine::pauseEngineIntern(bool pauseIt) { void AGOSEngine::pause() { pauseEngine(true); - while (_pause && !_quit) { + while (_pause && !quit()) { delay(1); if (_keyPressed.keycode == Common::KEYCODE_p) pauseEngine(false); @@ -989,7 +988,7 @@ int AGOSEngine::go() { (getFeatures() & GF_DEMO)) { int i; - while (!_quit) { + while (!quit()) { for (i = 0; i < 4; i++) { setWindowImage(3, 9902 + i); debug(0, "Displaying image %d", 9902 + i); @@ -1018,13 +1017,13 @@ int AGOSEngine::go() { runSubroutine101(); permitInput(); - while (!_quit) { + while (!quit()) { waitForInput(); handleVerbClicked(_verbHitArea); delay(100); } - return 0; + return _eventMan->shouldRTL(); } @@ -1084,4 +1083,12 @@ uint32 AGOSEngine::getTime() const { return (uint32)time(NULL); } + +void AGOSEngine::syncSoundSettings() { + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); + _midi.setVolume(ConfMan.getInt("music_volume"), ConfMan.getInt("sfx_volume")); +} + } // End of namespace AGOS |