aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-07-25 23:34:58 +0200
committeruruk2014-07-25 23:34:58 +0200
commit88286115c8dddfac4f45740c58a2e2d3a062be8d (patch)
treedbf53bfae4cf68491496d15cb526ea77ebc7a7d7
parent56da652e8f748155cea0269d3dec5f295905a9be (diff)
downloadscummvm-rg350-88286115c8dddfac4f45740c58a2e2d3a062be8d.tar.gz
scummvm-rg350-88286115c8dddfac4f45740c58a2e2d3a062be8d.tar.bz2
scummvm-rg350-88286115c8dddfac4f45740c58a2e2d3a062be8d.zip
CGE2: More refactoring in cge2.h and cge2.cpp.
-rw-r--r--engines/cge2/cge2.cpp13
-rw-r--r--engines/cge2/cge2.h15
2 files changed, 15 insertions, 13 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 985a77a1a3..b05fca8f1d 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -70,11 +70,8 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_vol[i] = nullptr;
_eventManager = nullptr;
_map = nullptr;
-
_quitFlag = false;
_bitmapPalette = nullptr;
- _music = true;
- _sfx = true;
_startupMode = 1;
_now = 1;
_sex = 1;
@@ -91,19 +88,23 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_endGame = false;
for (int i = 0; i < 4; i++)
_flag[i] = false;
- _enaVox = true;
- _sayCap = true;
- _sayVox = true;
_req = 1;
_midiNotify = nullptr;
_spriteNotify = nullptr;
+
_enaCap = true;
+ _enaVox = true;
+ _sayCap = true;
+ _sayVox = true;
if (ConfMan.getBool("mute")) {
_oldSpeechVolume = _oldMusicVolume = _oldSfxVolume = 0;
+ _music = _sfx = false;
} else {
_oldSpeechVolume = ConfMan.getInt("speech_volume");
_oldMusicVolume = ConfMan.getInt("music_volume");
_oldSfxVolume = ConfMan.getInt("sfx_volume");
+ _music = _oldMusicVolume != 0;
+ _sfx = _oldSfxVolume != 0;
}
}
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index c5f7b54afd..94263ac641 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -262,10 +262,6 @@ public:
bool _quitFlag;
Dac *_bitmapPalette;
- bool _music;
- bool _sfx;
- int _oldMusicVolume;
- int _oldSfxVolume;
int _startupMode;
int _now;
int _sex;
@@ -280,15 +276,20 @@ public:
bool _taken;
bool _endGame;
bool _flag[4];
- bool _sayCap;
- bool _sayVox;
- int _oldSpeechVolume;
int _req;
NotifyFunctionType _midiNotify;
NotifyFunctionType _spriteNotify;
int _startGameSlot;
+
bool _enaCap;
bool _enaVox;
+ bool _sayCap;
+ bool _sayVox;
+ int _oldSpeechVolume;
+ int _oldMusicVolume;
+ int _oldSfxVolume;
+ bool _music;
+ bool _sfx;
ResourceManager *_resman;
Vga *_vga;