diff options
author | Max Horn | 2003-01-16 00:47:08 +0000 |
---|---|---|
committer | Max Horn | 2003-01-16 00:47:08 +0000 |
commit | d4122d625f13e59f55ef2f957f0fad5194f5ce2b (patch) | |
tree | b7ae7f287d055be611b8b2c8b653990e2f41d0ef | |
parent | 8ad002b3a3f7d45d6056729c94b5fd4acdc24a9f (diff) | |
download | scummvm-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.cpp | 7 |
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) { |