diff options
author | Filippos Karapetis | 2007-08-01 23:38:31 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-08-01 23:38:31 +0000 |
commit | 6a82a3fbfcfda201655b55aea5fec13762e3cd95 (patch) | |
tree | 4a8e5e92936977a44f5c9ffc7b805af178134c08 /engines | |
parent | 87f0a934fb6c5ba54452148c4c5c7d3b45375352 (diff) | |
download | scummvm-rg350-6a82a3fbfcfda201655b55aea5fec13762e3cd95.tar.gz scummvm-rg350-6a82a3fbfcfda201655b55aea5fec13762e3cd95.tar.bz2 scummvm-rg350-6a82a3fbfcfda201655b55aea5fec13762e3cd95.zip |
The text of the psychic profile in IHNM is shown correctly now
svn-id: r28397
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/sfuncs.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index c0e105a8fd..a41ecfa6e8 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -1417,14 +1417,13 @@ void Script::sfPlacardOff(SCRIPTFUNC_PARAMS) { } void Script::sfPsychicProfile(SCRIPTFUNC_PARAMS) { - int stringId; + int stringId, textHeight; static PalEntry cur_pal[PAL_ENTRIES]; PalEntry *pal; + TextListEntry textEntry; Event event; Event *q_event; - // FIXME: This still needs work: the text placement is incorrect - thread->wait(kWaitTypePlacard); _vm->_interface->rememberMode(); @@ -1469,20 +1468,14 @@ void Script::sfPsychicProfile(SCRIPTFUNC_PARAMS) { q_event = _vm->_events->chain(q_event, &event); - // Put the text in the center of the viewport, assuming it will fit on - // one line. If we cannot make that assumption we'll need to extend - // the text drawing function so that it can center text around a point. - // It doesn't end up in exactly the same spot as the original did it, - // but it's close enough for now at least. - - // FIXME: This assumption is wrong for the psychic profile, the text - // placement is incorrect - - TextListEntry textEntry; + textHeight = _vm->_font->getHeight(kKnownFontVerb, thread->_strings->getString(stringId), 226, kFontCentered); textEntry.knownColor = kKnownColorBlack; - textEntry.point.x = _vm->getDisplayWidth() / 2; - textEntry.point.y = (_vm->_scene->getHeight() - _vm->_font->getHeight(kKnownFontMedium)) / 2; + textEntry.useRect = true; + textEntry.rect.left = 245; + textEntry.rect.setHeight(210 + 76); + textEntry.rect.setWidth(226); + textEntry.rect.top = 210 - textHeight; textEntry.font = kKnownFontVerb; textEntry.flags = (FontEffectFlags)(kFontCentered); textEntry.text = thread->_strings->getString(stringId); |