aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-16 17:14:28 -0500
committerPaul Gilbert2014-02-16 17:14:28 -0500
commita47bb52d2e5a76a88e039b80cc6e064f8e74a199 (patch)
tree1933ab7fdae1d524ec5f4372cb0f32bb28f06172
parent85e913864cb618211086c752ae79b0af51d28ae9 (diff)
downloadscummvm-rg350-a47bb52d2e5a76a88e039b80cc6e064f8e74a199.tar.gz
scummvm-rg350-a47bb52d2e5a76a88e039b80cc6e064f8e74a199.tar.bz2
scummvm-rg350-a47bb52d2e5a76a88e039b80cc6e064f8e74a199.zip
MADS: Add some missing channel initialisation
-rw-r--r--engines/mads/sound.cpp2
-rw-r--r--engines/mads/sound_nebular.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/engines/mads/sound.cpp b/engines/mads/sound.cpp
index 335afb4cdb..e3590f5ce7 100644
--- a/engines/mads/sound.cpp
+++ b/engines/mads/sound.cpp
@@ -42,7 +42,9 @@ void SoundManager::setVm(MADSEngine *vm, Audio::Mixer *mixer) {
void SoundManager::test() {
_asound = new Nebular::ASound1(_mixer);
+ _asound->command(5);
_asound->command(28);
+ _asound->command(19);
}
void SoundManager::poll() {
diff --git a/engines/mads/sound_nebular.cpp b/engines/mads/sound_nebular.cpp
index e364fbdf5d..6733f4e02e 100644
--- a/engines/mads/sound_nebular.cpp
+++ b/engines/mads/sound_nebular.cpp
@@ -70,7 +70,11 @@ void AdlibChannel::reset() {
void AdlibChannel::enable(int flag) {
if (_activeCount) {
_fieldE = flag;
- _soundData = nullptr; // TODO: Check original set it to flag??!
+
+ // WORKAROUND: Original set _soundData pointer to flag. Since this seems
+ // just intended to invalidate any prior pointer, I've replaced it with
+ // a simple null pointer
+ _soundData = nullptr;
}
}
@@ -930,11 +934,13 @@ int ASound1::command17() {
}
int ASound1::command18() {
+ command1();
playSound(0xCA6, 20);
return 0;
}
int ASound1::command19() {
+ command1();
playSound(0xCBA, 74);
return 0;
}