From cf001b11164802d26e470f98b6391d3da63f6f2b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 6 Sep 2019 22:14:12 +0200 Subject: HDB: Turn _voicesOn into a boolean --- engines/hdb/menu.cpp | 4 ++-- engines/hdb/sound.cpp | 4 ++-- engines/hdb/sound.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/hdb') 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 -- cgit v1.2.3