aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2015-05-05 07:00:24 +0200
committerStrangerke2015-05-05 07:00:24 +0200
commit0c12b85d4b67b022b227774db0cd531cf20d528e (patch)
tree1c5ef8248ca86562f2fbe2af487f2f49d1f72acb
parent034e1384aad1ed91bb8879cded8e0247ae6f9000 (diff)
downloadscummvm-rg350-0c12b85d4b67b022b227774db0cd531cf20d528e.tar.gz
scummvm-rg350-0c12b85d4b67b022b227774db0cd531cf20d528e.tar.bz2
scummvm-rg350-0c12b85d4b67b022b227774db0cd531cf20d528e.zip
SHERLOCK: Fix checkForSoundFrames, add some warning TODOs
-rw-r--r--engines/sherlock/animation.cpp2
-rw-r--r--engines/sherlock/sherlock.h1
-rw-r--r--engines/sherlock/sound.cpp32
-rw-r--r--engines/sherlock/sound.h3
4 files changed, 27 insertions, 11 deletions
diff --git a/engines/sherlock/animation.cpp b/engines/sherlock/animation.cpp
index aea4793a76..b1ec6590b1 100644
--- a/engines/sherlock/animation.cpp
+++ b/engines/sherlock/animation.cpp
@@ -182,7 +182,7 @@ bool Animation::play(const Common::String &filename, int minDelay, int fade,
const int *Animation::checkForSoundFrames(const Common::String &filename) {
const int *frames = &NO_FRAMES;
- if (!_vm->_soundOverride.empty()) {
+ if (_vm->_soundOverride.empty()) {
for (int idx = 0; idx < PROLOGUE_NAMES_COUNT; ++idx) {
if (!scumm_stricmp(filename.c_str(), PROLOGUE_NAMES[idx])) {
frames = &PROLOGUE_FRAMES[idx][0];
diff --git a/engines/sherlock/sherlock.h b/engines/sherlock/sherlock.h
index 95fe514e0c..06d38cbf89 100644
--- a/engines/sherlock/sherlock.h
+++ b/engines/sherlock/sherlock.h
@@ -27,6 +27,7 @@
#include "common/array.h"
#include "common/endian.h"
#include "common/hash-str.h"
+#include "common/serializer.h"
#include "common/random.h"
#include "common/savefile.h"
#include "common/util.h"
diff --git a/engines/sherlock/sound.cpp b/engines/sherlock/sound.cpp
index e66f82e5c4..1ee9535f31 100644
--- a/engines/sherlock/sound.cpp
+++ b/engines/sherlock/sound.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "sherlock/sherlock.h"
#include "sherlock/sound.h"
#include "common/config-manager.h"
@@ -29,12 +30,14 @@ Sound::Sound(SherlockEngine *vm): _vm(vm) {
_digitized = false;
_music = false;
_voices = 0;
- _soundOn = false;
- _musicOn = false;
- _speechOn = false;
_playingEpilogue = false;
_diskSoundPlaying = false;
- _soundIsOn = nullptr;
+ _soundPlaying = false;
+ _soundIsOn = &_soundPlaying;
+
+ _soundOn = true;
+ _musicOn = true;
+ _speechOn = true;
}
/**
@@ -44,79 +47,90 @@ void Sound::syncSoundSettings() {
_digitized = !ConfMan.getBool("mute");
_music = !ConfMan.getBool("mute") && !ConfMan.getBool("music_mute");
_voices = !ConfMan.getBool("mute") && !ConfMan.getBool("speech_mute") ? 1 : 0;
-
- // TODO: For now, keep sound completely mute until sound is implemented
- _digitized = false;
- _music = false;
- _voices = 0;
}
void Sound::loadSound(const Common::String &name, int priority) {
// TODO
+ warning("TODO: Sound::loadSound");
}
bool Sound::playSound(const Common::String &name, WaitType waitType) {
// TODO
+ warning("TODO: Sound::playSound");
return true;
}
void Sound::cacheSound(const Common::String &name, int index) {
// TODO
+ warning("TODO: Sound::cacheSound");
}
void Sound::playLoadedSound(int bufNum, int waitMode) {
// TODO
+ warning("TODO: Sound::playLoadedSound");
}
void Sound::playCachedSound(int index) {
// TODO
+ warning("TODO: Sound::playCachedSound");
}
void Sound::freeLoadedSounds() {
// TODO
+ warning("TODO: Sound::clearLoadedSound");
}
void Sound::clearCache() {
// TODO
+ warning("TODO: Sound::clearCache");
}
void Sound::stopSound() {
// TODO
+ warning("TODO: Sound::stopSound");
}
void Sound::playMusic(const Common::String &name) {
// TODO
+ warning("TODO: Sound::playMusic");
}
void Sound::stopMusic() {
// TODO
+ warning("TODO: Sound::stopMusic");
}
int Sound::loadSong(int songNumber) {
// TODO
+ warning("TODO: Sound::loadSong");
return 0;
}
void Sound::startSong() {
// TODO
+ warning("TODO: Sound::startSong");
}
void Sound::freeSong() {
// TODO
+ warning("TODO: Sound::freeSong");
}
void Sound::stopSndFuncPtr(int v1, int v2) {
// TODO
+ warning("TODO: Sound::stopSndFuncPtr");
}
void Sound::waitTimerRoland(uint time) {
// TODO
+ warning("TODO: Sound::waitTimerRoland");
}
void Sound::freeDigiSound() {
delete[] _digiBuf;
_digiBuf = nullptr;
_diskSoundPlaying = false;
+ _soundPlaying = false;
}
} // End of namespace Sherlock
diff --git a/engines/sherlock/sound.h b/engines/sherlock/sound.h
index 3bd3a99f07..1fd4c29b12 100644
--- a/engines/sherlock/sound.h
+++ b/engines/sherlock/sound.h
@@ -46,7 +46,8 @@ public:
bool _speechOn;
bool _playingEpilogue;
bool _diskSoundPlaying;
- byte *_soundIsOn;
+ bool _soundPlaying;
+ bool *_soundIsOn;
byte *_digiBuf;
public:
Sound(SherlockEngine *vm);