aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/sound.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-13 22:34:40 +1000
committerPaul Gilbert2012-05-13 22:34:40 +1000
commit546f47ddcee07b5bd7ecad5f25f4bb022944e234 (patch)
treef3b6953eaf877174014fc40268ad9084f1e3327b /engines/tony/sound.cpp
parent35143eae094b713524ef677412befdc4c766df04 (diff)
downloadscummvm-rg350-546f47ddcee07b5bd7ecad5f25f4bb022944e234.tar.gz
scummvm-rg350-546f47ddcee07b5bd7ecad5f25f4bb022944e234.tar.bz2
scummvm-rg350-546f47ddcee07b5bd7ecad5f25f4bb022944e234.zip
TONY: Beginnings of refactoring Globals into their own class
Diffstat (limited to 'engines/tony/sound.cpp')
-rw-r--r--engines/tony/sound.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 01968ea579..53d3b962d2 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -51,13 +51,6 @@
namespace Tony {
-extern bool bCfgMusic;
-extern bool bCfgSFX;
-extern bool bCfgDubbing;
-extern int nCfgSFXVolume;
-extern int nCfgMusicVolume;
-extern int nCfgDubbingVolume;
-
/****************************************************************************\
* Defines
@@ -1527,15 +1520,15 @@ void FPSFX::SetVolume(int dwVolume) {
lastVolume = dwVolume;
if (bIsVoice) {
- if (!bCfgDubbing) dwVolume = 0;
+ if (!GLOBALS.bCfgDubbing) dwVolume = 0;
else {
- dwVolume -= (10 - nCfgDubbingVolume) * 2;
+ dwVolume -= (10 - GLOBALS.nCfgDubbingVolume) * 2;
if (dwVolume<0) dwVolume = 0;
}
} else {
- if (!bCfgSFX) dwVolume = 0;
+ if (!GLOBALS.bCfgSFX) dwVolume = 0;
else {
- dwVolume -= (10 - nCfgSFXVolume) * 2;
+ dwVolume -= (10 - GLOBALS.nCfgSFXVolume) * 2;
if (dwVolume < 0) dwVolume = 0;
}
}
@@ -2273,9 +2266,9 @@ void FPSTREAM::SetVolume(int dwVolume) {
lastVolume = dwVolume;
- if (!bCfgMusic) dwVolume = 0;
+ if (!GLOBALS.bCfgMusic) dwVolume = 0;
else {
- dwVolume -= (10 - nCfgMusicVolume) * 2;
+ dwVolume -= (10 - GLOBALS.nCfgMusicVolume) * 2;
if (dwVolume<0) dwVolume = 0;
}