aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-07-25 22:34:39 +0200
committeruruk2014-07-25 22:34:39 +0200
commiteaddafdea707c03a7f4c6be0e7c24aafaae4dd34 (patch)
tree0f90c84e20e33e1b298fb41784149adade0ad52e
parent944465431a4b0d4c8372456e52720f7baf5865ec (diff)
downloadscummvm-rg350-eaddafdea707c03a7f4c6be0e7c24aafaae4dd34.tar.gz
scummvm-rg350-eaddafdea707c03a7f4c6be0e7c24aafaae4dd34.tar.bz2
scummvm-rg350-eaddafdea707c03a7f4c6be0e7c24aafaae4dd34.zip
CGE2: Get rid of unnecessary variables.
-rw-r--r--engines/cge2/cge2.cpp6
-rw-r--r--engines/cge2/cge2.h2
-rw-r--r--engines/cge2/toolbar.cpp4
3 files changed, 5 insertions, 7 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 9dbbf7db06..985a77a1a3 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -99,11 +99,11 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_spriteNotify = nullptr;
_enaCap = true;
if (ConfMan.getBool("mute")) {
- _oldSpeechVolume = _oldMusicVolume = _musicVolume = _sfxVolume = 0;
+ _oldSpeechVolume = _oldMusicVolume = _oldSfxVolume = 0;
} else {
_oldSpeechVolume = ConfMan.getInt("speech_volume");
- _oldMusicVolume = _musicVolume = ConfMan.getInt("music_volume");
- _oldSfxVolume = _sfxVolume = ConfMan.getInt("sfx_volume");
+ _oldMusicVolume = ConfMan.getInt("music_volume");
+ _oldSfxVolume = ConfMan.getInt("sfx_volume");
}
}
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index 613168e88e..987a77386c 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -286,8 +286,6 @@ public:
int _startGameSlot;
bool _enaCap;
bool _enaVox;
- int _musicVolume;
- int _sfxVolume;
ResourceManager *_resman;
Vga *_vga;
diff --git a/engines/cge2/toolbar.cpp b/engines/cge2/toolbar.cpp
index bf538b5f5a..d8687e3944 100644
--- a/engines/cge2/toolbar.cpp
+++ b/engines/cge2/toolbar.cpp
@@ -276,9 +276,9 @@ void CGE2Engine::initToolbar() {
_vol[1] = _vga->_showQ->locate(kMvolRef);
if (_vol[0])
- _vol[0]->step(_sfxVolume / kSoundNumtoStateRate);
+ _vol[0]->step(ConfMan.getInt("sfx_volume") / kSoundNumtoStateRate);
if (_vol[1])
- _vol[1]->step(_musicVolume / kSoundNumtoStateRate);
+ _vol[1]->step(ConfMan.getInt("music_volume") / kSoundNumtoStateRate);
}
} // End of namespace CGE2