aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorStrangerke2019-09-06 22:14:12 +0200
committerStrangerke2019-09-06 22:14:12 +0200
commitcf001b11164802d26e470f98b6391d3da63f6f2b (patch)
tree9ffaebd036c2e88f714c06721aad3a0780a237ac /engines/hdb
parent44de7e8d5e36119f7a1359d55ff15c7b2f5bd529 (diff)
downloadscummvm-rg350-cf001b11164802d26e470f98b6391d3da63f6f2b.tar.gz
scummvm-rg350-cf001b11164802d26e470f98b6391d3da63f6f2b.tar.bz2
scummvm-rg350-cf001b11164802d26e470f98b6391d3da63f6f2b.zip
HDB: Turn _voicesOn into a boolean
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/menu.cpp4
-rw-r--r--engines/hdb/sound.cpp4
-rw-r--r--engines/hdb/sound.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp
index d15993bcec..6c89c93828 100644
--- a/engines/hdb/menu.cpp
+++ b/engines/hdb/menu.cpp
@@ -1501,8 +1501,8 @@ void Menu::processInput(int x, int y) {
y >= _optionsY + kOptionLineSPC * 4 + 24 && y <= _optionsY + kOptionLineSPC * 4 + 40) {
// Voices ON/OFF
if (!g_hdb->isVoiceless()) {
- int value = g_hdb->_sound->getVoiceStatus();
- value ^= 1;
+ bool value = g_hdb->_sound->getVoiceStatus();
+ value ^= true;
g_hdb->_sound->setVoiceStatus(value);
g_hdb->_sound->playSound(SND_GUI_INPUT);
}
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp
index 057d97ddc6..404e0deebc 100644
--- a/engines/hdb/sound.cpp
+++ b/engines/hdb/sound.cpp
@@ -1409,7 +1409,7 @@ Sound::Sound() {
_sfxVolume = 255;
_musicVolume = 255;
_numSounds = 0;
- _voicesOn = 0;
+ _voicesOn = false;
}
void Sound::test() {
@@ -1449,7 +1449,7 @@ void Sound::init() {
_numSounds = index;
// voices are on by default
- _voicesOn = 1;
+ _voicesOn = true;
memset(&_voicePlayed[0], 0, sizeof(_voicePlayed));
}
diff --git a/engines/hdb/sound.h b/engines/hdb/sound.h
index d49b522487..8cf687d3d6 100644
--- a/engines/hdb/sound.h
+++ b/engines/hdb/sound.h
@@ -1494,10 +1494,10 @@ public:
int getSFXVolume() {
return _sfxVolume;
}
- void setVoiceStatus(int value) {
+ void setVoiceStatus(bool value) {
_voicesOn = value;
}
- int getVoiceStatus() {
+ bool getVoiceStatus() {
return _voicesOn;
}
void clearPersistent() {
@@ -1547,7 +1547,7 @@ public:
Voice _voices[MAX_VOICES];
- int _voicesOn;
+ bool _voicesOn;
byte _voicePlayed[NUM_VOICES];
// Music System Variables