aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/sound.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-07-25 06:51:06 +0530
committerEugene Sandulenko2019-09-03 17:17:28 +0200
commita09ac7b1140b3b1db32b5f6cb553643744544400 (patch)
tree321895553a2d40e1f142d0a889fa0497ede3b026 /engines/hdb/sound.cpp
parent236318ce0cef0ed50d4c6876a74ebe1994567a98 (diff)
downloadscummvm-rg350-a09ac7b1140b3b1db32b5f6cb553643744544400.tar.gz
scummvm-rg350-a09ac7b1140b3b1db32b5f6cb553643744544400.tar.bz2
scummvm-rg350-a09ac7b1140b3b1db32b5f6cb553643744544400.zip
HDB: Add voice related data
Diffstat (limited to 'engines/hdb/sound.cpp')
-rw-r--r--engines/hdb/sound.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp
index 5eda13341c..88bede7d9a 100644
--- a/engines/hdb/sound.cpp
+++ b/engines/hdb/sound.cpp
@@ -21,10 +21,6 @@
*/
#include "common/debug.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
-#include "audio/decoders/wave.h"
-#include "audio/decoders/mp3.h"
#include "hdb/hdb.h"
#include "hdb/file-manager.h"
@@ -1430,21 +1426,22 @@ bool Sound::init() {
_numSounds = index;
// voices are on by default
- warning("STUB: Initialize voices");
+ _voicesOn = 1;
+ memset(&_voicePlayed[0], 0, sizeof(_voicePlayed));
return true;
}
void Sound::save(Common::OutSaveFile *out) {
- warning("STUB: Sound::save()");
+ for (int i = 0; i < NUM_VOICES; i++) {
+ out->writeByte(_voicePlayed[i]);
+ }
}
void Sound::loadSaveFile(Common::InSaveFile *in) {
- warning("STUB: Sound::loadSaveFile()");
-}
-
-void Sound::clearPersistent() {
- warning("STUB: Sound::clearPersistent()");
+ for (int i = 0; i < NUM_VOICES; i++) {
+ _voicePlayed[i] = in->readByte();
+ }
}
bool Sound::playSound(int index) {