aboutsummaryrefslogtreecommitdiff
path: root/engines/made/scriptfuncs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-01-06 10:40:38 +0000
committerPaul Gilbert2009-01-06 10:40:38 +0000
commite2463f77cdc4a11038843668988b388d03f06477 (patch)
treee944bb1aa7d5fa03655d8667b8d89b73884cd177 /engines/made/scriptfuncs.cpp
parenteeaaabc7d4016796186801e816ff0676bb75d29e (diff)
downloadscummvm-rg350-e2463f77cdc4a11038843668988b388d03f06477.tar.gz
scummvm-rg350-e2463f77cdc4a11038843668988b388d03f06477.tar.bz2
scummvm-rg350-e2463f77cdc4a11038843668988b388d03f06477.zip
Changed sfGetSoundEnergy to use the correct soundEnergy value from decompressing sounds for proper lip-sync
svn-id: r35751
Diffstat (limited to 'engines/made/scriptfuncs.cpp')
-rw-r--r--engines/made/scriptfuncs.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index 72ce3e238c..e102a15487 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -34,6 +34,7 @@
#include "made/database.h"
#include "made/screen.h"
#include "made/script.h"
+#include "made/sound.h"
#include "made/pmvplayer.h"
#include "made/scriptfuncs.h"
#include "made/music.h"
@@ -596,12 +597,9 @@ int16 ScriptFunctions::sfClearMono(int16 argc, int16 *argv) {
}
int16 ScriptFunctions::sfGetSoundEnergy(int16 argc, int16 *argv) {
- // This is called while in-game voices are played
- // Not sure what it's used for
- // -> It's used to animate mouths when NPCs are talking
- // FIXME: This is a workaround for the "sound energy" problem
- // At least the characters move their lips when talking now
- return _vm->_rnd->getRandomNumber(5);
+ // This is called while in-game voices are played to animate
+ // mouths when NPCs are talking
+ return soundEnergy;
}
int16 ScriptFunctions::sfClearText(int16 argc, int16 *argv) {