From c17e4f1b684daaf5a7c9b8a4e1985c66edb46401 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Thu, 12 Nov 2009 00:57:38 +0000 Subject: Subtitles are positioned correctly in the inventory svn-id: r45849 --- engines/draci/script.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'engines/draci/script.cpp') 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 ¶ms) { 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); -- cgit v1.2.3