From 36f77ad3f96745f45980b86f2d68cec40689c4c9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 29 Sep 2005 15:57:41 +0000 Subject: Fix fonts in intro. It is a very dirty code. Actually we should specify font Ids in game settings. Also uhnm demo will definitely not work with current code as it has lesser number of fonts. svn-id: r18900 --- saga/sfuncs.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'saga/sfuncs.cpp') diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index 8dadea2938..b0508cba08 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1583,13 +1583,20 @@ void Script::sfScriptText(SCRIPTFUNC_PARAMS) { point.y = thread->pop(); text = thread->_strings->getString(stringId); - width = _vm->_font->getStringWidth(kMediumFont, text, 0, kFontOutline); + + if (_vm->getGameType() == GType_ITE) + width = _vm->_font->getStringWidth(kMediumFont, text, 0, kFontOutline); + else + width = _vm->_font->getStringWidth(kIHNMMainFont, text, 0, kFontOutline); rect.top = point.y - 6; rect.setHeight(12); rect.left = point.x - width / 2; rect.setWidth(width); - _vm->_actor->setSpeechColor(color, kITEColorBlack); + if (_vm->getGameType() == GType_ITE) + _vm->_actor->setSpeechColor(color, kITEColorBlack); + else + _vm->_actor->setSpeechColor(color, kIHNMColorBlack); _vm->_actor->nonActorSpeech(rect, &text, 1, -1, flags); } -- cgit v1.2.3