[Scummvm-cvs-logs] SF.net SVN: scummvm:[33090] scummvm/branches/gsoc2008-rtl/engines/sword1
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Thu Jul 17 19:49:40 CEST 2008
Revision: 33090
http://scummvm.svn.sourceforge.net/scummvm/?rev=33090&view=rev
Author: cpage88
Date: 2008-07-17 17:49:38 +0000 (Thu, 17 Jul 2008)
Log Message:
-----------
SWORD1 Sound settings work with the GMM
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp
scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.h
Modified: scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp 2008-07-17 15:56:24 UTC (rev 33089)
+++ scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.cpp 2008-07-17 17:49:38 UTC (rev 33090)
@@ -357,6 +357,32 @@
_systemVars.wantFade = true;
}
+void SwordEngine::syncSoundSettings() {
+ int soundVolumeSFX = ConfMan.getInt("sfx_volume");
+ int soundVolumeSpeech = ConfMan.getInt("speech_volume");
+
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSFX);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech);
+
+ uint musicVol = ConfMan.getInt("music_volume");
+ uint musicBal = 50;
+ if (ConfMan.hasKey("music_balance")) {
+ musicBal = CLIP(ConfMan.getInt("music_balance"), 0, 100);
+ }
+
+ uint musicVolL = 2 * musicVol * musicBal / 100;
+ uint musicVolR = 2 * musicVol - musicVolL;
+
+ if (musicVolR > 255) {
+ musicVolR = 255;
+ }
+ if (musicVolL > 255) {
+ musicVolL = 255;
+ }
+
+ _music->setVolume(musicVolL, musicVolR);
+}
+
void SwordEngine::flagsToBool(bool *dest, uint8 flags) {
uint8 bitPos = 0;
while (flags) {
Modified: scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.h 2008-07-17 15:56:24 UTC (rev 33089)
+++ scummvm/branches/gsoc2008-rtl/engines/sword1/sword1.h 2008-07-17 17:49:38 UTC (rev 33090)
@@ -77,6 +77,7 @@
virtual ~SwordEngine();
static SystemVars _systemVars;
void reinitialize(void);
+ virtual void syncSoundSettings();
uint32 _features;
protected:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list