[Scummvm-cvs-logs] SF.net SVN: scummvm:[42706] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Fri Jul 24 23:31:58 CEST 2009
Revision: 42706
http://scummvm.svn.sourceforge.net/scummvm/?rev=42706&view=rev
Author: drmccoy
Date: 2009-07-24 21:31:58 +0000 (Fri, 24 Jul 2009)
Log Message:
-----------
Caching the subtitle font and color, because some don't assign those
Modified Paths:
--------------
scummvm/trunk/engines/gob/draw.cpp
scummvm/trunk/engines/gob/draw.h
scummvm/trunk/engines/gob/draw_v2.cpp
Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp 2009-07-24 21:31:00 UTC (rev 42705)
+++ scummvm/trunk/engines/gob/draw.cpp 2009-07-24 21:31:58 UTC (rev 42706)
@@ -303,6 +303,8 @@
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,
Modified: scummvm/trunk/engines/gob/draw.h
===================================================================
--- scummvm/trunk/engines/gob/draw.h 2009-07-24 21:31:00 UTC (rev 42705)
+++ scummvm/trunk/engines/gob/draw.h 2009-07-24 21:31:58 UTC (rev 42706)
@@ -77,6 +77,9 @@
int16 _backDeltaX;
int16 _backDeltaY;
+ int16 _subtitleFont;
+ int16 _subtitleColor;
+
FontToSprite _fontToSprite[4];
Font *_fonts[kFontCount];
Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp 2009-07-24 21:31:00 UTC (rev 42705)
+++ scummvm/trunk/engines/gob/draw_v2.cpp 2009-07-24 21:31:58 UTC (rev 42706)
@@ -216,7 +216,9 @@
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 @@
} 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 @@
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:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list