aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Špalek2009-11-12 00:57:38 +0000
committerRobert Špalek2009-11-12 00:57:38 +0000
commitc17e4f1b684daaf5a7c9b8a4e1985c66edb46401 (patch)
tree04b9a9465d0c8a1ba72a42143e7ee2bafc1dbdd3
parentd281fe4717f4dad20a0390e81ada17d10cead2bb (diff)
downloadscummvm-rg350-c17e4f1b684daaf5a7c9b8a4e1985c66edb46401.tar.gz
scummvm-rg350-c17e4f1b684daaf5a7c9b8a4e1985c66edb46401.tar.bz2
scummvm-rg350-c17e4f1b684daaf5a7c9b8a4e1985c66edb46401.zip
Subtitles are positioned correctly in the inventory
svn-id: r45849
-rw-r--r--engines/draci/draci.h1
-rw-r--r--engines/draci/script.cpp13
2 files changed, 9 insertions, 5 deletions
diff --git a/engines/draci/draci.h b/engines/draci/draci.h
index 68e56bb2d7..746bfa09f1 100644
--- a/engines/draci/draci.h
+++ b/engines/draci/draci.h
@@ -42,6 +42,7 @@
#include "draci/animation.h"
#include "draci/sound.h"
#include "draci/music.h"
+#include "draci/walking.h"
namespace Draci {
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index 51df1fd2ef..bed04f7b95 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -768,12 +768,15 @@ void Script::talk(const Common::Array<int> &params) {
const uint duration = MAX(subtitleDuration, dubbingDuration);
_vm->_game->setSpeechTiming(_vm->_system->getMillis(), duration);
- // TODO: Implement inventory part
-
// Set speech text coordinates
-
- int x = surface->centerOnX(person->_x, speechFrame->getWidth());
- int y = surface->putAboveY(person->_y, speechFrame->getHeight());
+ int x, y;
+ if (_vm->_game->getLoopStatus() == kStatusInventory) {
+ x = surface->centerOnX(160, speechFrame->getWidth());
+ y = 4;
+ } else {
+ x = surface->centerOnX(person->_x, speechFrame->getWidth());
+ y = surface->putAboveY(person->_y, speechFrame->getHeight());
+ }
speechFrame->setX(x);
speechFrame->setY(y);