aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/utils.cpp
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-25 01:23:36 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commita1f69e6b06160d75ff85a0c292c88709abc4f7e9 (patch)
treedc22ab48bb686a0256e7f17346b5d1b6f3756a1b /engines/mortevielle/utils.cpp
parent99550a95b20d74afd845f95713ce132c2dcbfa93 (diff)
downloadscummvm-rg350-a1f69e6b06160d75ff85a0c292c88709abc4f7e9.tar.gz
scummvm-rg350-a1f69e6b06160d75ff85a0c292c88709abc4f7e9.tar.bz2
scummvm-rg350-a1f69e6b06160d75ff85a0c292c88709abc4f7e9.zip
MORTEVIELLE: Refactoring as suggested by Criezy
* Add checks if ttsMan != null before trying to use it * Simplify startSpeech * Move haut to startSpeech and pass the character index to the startSpeech instead.
Diffstat (limited to 'engines/mortevielle/utils.cpp')
-rw-r--r--engines/mortevielle/utils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp
index 4ad8a8e4b3..dd19c2650c 100644
--- a/engines/mortevielle/utils.cpp
+++ b/engines/mortevielle/utils.cpp
@@ -1330,7 +1330,6 @@ void MortevielleEngine::displayDiningRoom() {
* @remarks Originally called 'sparl'
*/
void MortevielleEngine::startDialog(int16 rep) {
- const int haut[9] = { 0, 0, 1, -3, 6, -2, 2, 7, -1 };
int key;
assert(rep >= 0);
@@ -1342,7 +1341,7 @@ void MortevielleEngine::startDialog(int16 rep) {
key = 0;
do {
- _soundManager->startSpeech(rep, haut[_caff - 69], 0);
+ _soundManager->startSpeech(rep, _caff - 69, 0);
key = _dialogManager->waitForF3F8();
if (shouldQuit())
return;