aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-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) {