aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/draw.cpp2
-rw-r--r--engines/gob/draw.h3
-rw-r--r--engines/gob/draw_v2.cpp21
3 files changed, 23 insertions, 3 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index fb3cb9bbcd..46f75f67aa 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -303,6 +303,8 @@ void Draw::dirtiedRect(SurfaceDescPtr surface,
invalidateRect(left, top, right, bottom);
else if (surface == _frontSurface)
_vm->_video->dirtyRectsAdd(left, top, right, bottom);
+ else if (_vm->_video->_splitSurf && (surface == _vm->_video->_splitSurf))
+ _vm->_video->retrace();
}
void Draw::initSpriteSurf(int16 index, int16 width, int16 height,
diff --git a/engines/gob/draw.h b/engines/gob/draw.h
index b41cb1abad..1da6ba4b74 100644
--- a/engines/gob/draw.h
+++ b/engines/gob/draw.h
@@ -77,6 +77,9 @@ public:
int16 _backDeltaX;
int16 _backDeltaY;
+ int16 _subtitleFont;
+ int16 _subtitleColor;
+
FontToSprite _fontToSprite[4];
Font *_fonts[kFontCount];
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index 9b7a536759..5312b9c00a 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -216,7 +216,9 @@ void Draw_v2::printTotText(int16 id) {
dataPtr = textItem->getData();
ptr = dataPtr;
- if ((ptr[1] & 0x80) && !_vm->subtitles()) {
+ bool isSubtitle = (ptr[1] & 0x80) != 0;
+
+ if (isSubtitle && !_vm->subtitles()) {
delete textItem;
return;
}
@@ -398,10 +400,15 @@ void Draw_v2::printTotText(int16 id) {
} else {
_destSpriteX = offX;
_destSpriteY = offY;
- _fontIndex = fontIndex;
- _frontColor = frontColor;
+ _fontIndex = fontIndex;
+ _frontColor = frontColor;
_textToPrint = str;
+ if (isSubtitle) {
+ _fontIndex = _subtitleFont;
+ _frontColor = _subtitleColor;
+ }
+
if (_needAdjust != 2) {
if ((_destSpriteX >= destX) && (_destSpriteY >= destY) &&
(((_fonts[_fontIndex]->getCharHeight() / 2) + _destSpriteY - 1) <= spriteBottom)) {
@@ -461,11 +468,19 @@ void Draw_v2::printTotText(int16 id) {
fontIndex = ((*ptr & 0xF0) >> 4) & 7;
frontColor = *ptr & 0x0F;
ptr++;
+
+ if (isSubtitle) {
+ _subtitleFont = fontIndex;
+ _subtitleColor = frontColor;
+ }
break;
case 4:
ptr++;
frontColor = *ptr++;
+
+ if (isSubtitle)
+ _subtitleColor = frontColor;
break;
case 6: