aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-01-31 22:14:35 +0100
committerMartin Kiewitz2016-01-31 22:14:35 +0100
commita9b25b53d7a7084941553166abd20a602e83e184 (patch)
treeacac0d2b174b060b16e0ae2cdcd66121b2f57c16 /engines/agi/agi.cpp
parentfd9c46831df3bcd09bc6f85d5e41c2beb3f7c024 (diff)
downloadscummvm-rg350-a9b25b53d7a7084941553166abd20a602e83e184.tar.gz
scummvm-rg350-a9b25b53d7a7084941553166abd20a602e83e184.tar.bz2
scummvm-rg350-a9b25b53d7a7084941553166abd20a602e83e184.zip
AGI: properly implement volume control + sync
Original code did assume that AGI volume level is 0-15 (0 for silence, 15 for maximum volume). It actually is the other way. 0 is maximum, 15 is silence. Fixed that. Also implemented sync with ScummVM settings dialog. In case "mute" is enabled by the user, any volume changes done by scripts are ignored. Fixes Manhunter 1 Apple IIgs not getting sound anymore since the VM Var cleanup (the script volume change by the scripts didn't reach us before)
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r--engines/agi/agi.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index c8490d4a89..9c66c38487 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -184,6 +184,12 @@ int AgiEngine::agiInit() {
_game.mouseFence.setWidth(0); // Reset
+ // Reset in-game timer
+ inGameTimerReset();
+
+ // Sync volume settings from ScummVM system settings
+ setVolumeViaSystemSetting();
+
return ec;
}