aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2015-10-21 21:08:33 +0300
committerFilippos Karapetis2015-10-21 21:08:33 +0300
commitd7ba77cfe6bba1dc88bf6d87f7829e0dc302e748 (patch)
treecdbb5fdfbd197a715eb30c18aa9f6f636e42efc1 /engines
parent52d035e96228a470fcc978d08ef9fb2b4ea5f500 (diff)
downloadscummvm-rg350-d7ba77cfe6bba1dc88bf6d87f7829e0dc302e748.tar.gz
scummvm-rg350-d7ba77cfe6bba1dc88bf6d87f7829e0dc302e748.tar.bz2
scummvm-rg350-d7ba77cfe6bba1dc88bf6d87f7829e0dc302e748.zip
MADS: Phantom: Implement loadSpeech() and playSpeech()
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/phantom/phantom_scenes1.cpp1
-rw-r--r--engines/mads/scene.cpp9
-rw-r--r--engines/mads/scene.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index a93be72592..f9f97db428 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -8021,7 +8021,6 @@ void Scene113::step() {
_game._objects.addToInventory(OBJ_SMALL_NOTE);
_scene->deleteSequence(_globals._sequenceIndexes[1]);
_vm->_sound->command(26);
- _scene->_speechReady = -1;
_vm->_dialogs->showItem(OBJ_SMALL_NOTE, 806, 2);
}
}
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ea5943cd37..34d96778b8 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -24,6 +24,7 @@
#include "mads/scene.h"
#include "mads/compression.h"
#include "mads/mads.h"
+#include "mads/audio.h"
#include "mads/dragonsphere/dragonsphere_scenes.h"
#include "mads/nebular/nebular_scenes.h"
#include "mads/phantom/phantom_scenes.h"
@@ -61,7 +62,6 @@ Scene::Scene(MADSEngine *vm)
_spritesCount = 0;
_variant = 0;
_initialVariant = 0;
- _speechReady = -1;
_paletteUsageF.push_back(PaletteUsage::UsageEntry(0xF));
@@ -782,11 +782,14 @@ void Scene::deleteSequence(int idx) {
}
void Scene::loadSpeech(int idx) {
- warning("TODO: Scene::loadSpeech");
+ _vm->_audio->setDefaultSoundGroup();
+ // NOTE: The original actually preloads the speech sample here, but the samples
+ // are so small that it's not really worth it...
}
void Scene::playSpeech(int idx) {
- warning("TODO: Scene::playSpeech");
+ _vm->_audio->stop();
+ _vm->_audio->playSound(idx - 1);
}
void Scene::sceneScale(int front_y, int front_scale, int back_y, int back_scale) {
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index f0b4326c8f..b818a0298e 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -129,7 +129,6 @@ public:
Common::Point _customDest;
Common::Array<PaletteUsage::UsageEntry> _paletteUsageF;
Common::Array<PaletteUsage::UsageEntry> _scenePaletteUsage;
- int _speechReady;
/**
* Constructor
*/