From d4122d625f13e59f55ef2f957f0fad5194f5ce2b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 16 Jan 2003 00:47:08 +0000 Subject: added center mode for blastText (and boy, our charset code is *messy* ) svn-id: r6473 --- scumm/script_v8.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scumm/script_v8.cpp') diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 0ba17d5d0b..226a47c30f 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -601,6 +601,13 @@ void Scumm::drawBlastTexts() _charset->_nextLeft = _blastTextQueue[i].xpos; _charset->_nextTop = _blastTextQueue[i].ypos; + // Center text if necessary + if (_charset->_center) { + _charset->_nextLeft -= _charset->getStringWidth(0, buf) >> 1; + if (_charset->_nextLeft < 0) + _charset->_nextLeft = 0; + } + do { c = *buf++; if (c != 0 && c != 0xFF) { -- cgit v1.2.3