aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-01-16 00:47:08 +0000
committerMax Horn2003-01-16 00:47:08 +0000
commitd4122d625f13e59f55ef2f957f0fad5194f5ce2b (patch)
treeb7ae7f287d055be611b8b2c8b653990e2f41d0ef
parent8ad002b3a3f7d45d6056729c94b5fd4acdc24a9f (diff)
downloadscummvm-rg350-d4122d625f13e59f55ef2f957f0fad5194f5ce2b.tar.gz
scummvm-rg350-d4122d625f13e59f55ef2f957f0fad5194f5ce2b.tar.bz2
scummvm-rg350-d4122d625f13e59f55ef2f957f0fad5194f5ce2b.zip
added center mode for blastText (and boy, our charset code is *messy* <sigh>)
svn-id: r6473
-rw-r--r--scumm/script_v8.cpp7
1 files changed, 7 insertions, 0 deletions
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) {