aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2011-05-04 02:26:50 +0200
committerSven Hesse2011-05-04 02:35:07 +0200
commit24341a19bb3d3e682c96696d131bb496ed948f78 (patch)
tree2a44c14cfb660add6a9b77be9c505cad7420d09f /engines/gob
parent5b9c3a1ff87180fbef093e84282ca74f89dc1be6 (diff)
downloadscummvm-rg350-24341a19bb3d3e682c96696d131bb496ed948f78.tar.gz
scummvm-rg350-24341a19bb3d3e682c96696d131bb496ed948f78.tar.bz2
scummvm-rg350-24341a19bb3d3e682c96696d131bb496ed948f78.zip
GOB: Don't overwrite _destSpriteX after PRINTTEXT
Don't overwrite _destSpriteX after PRINTTEXT with a value that's only appropriate for monospaced fonts; support for non-monospaced fonts has been introduced with Woodruff. This should fix bug #3295889. (cherry picked from commit a1c339ea4f70d4f93310fbece51a6b3348e769f4)
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/draw_v2.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index 15a8f7ff8e..c07f8de69d 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -899,17 +899,12 @@ void Draw_v2::spriteOperation(int16 operation) {
_spriteTop = spriteTop;
_spriteRight = spriteRight;
_spriteBottom = spriteBottom;
- _destSpriteX = destSpriteX;
+ if (operation != DRAW_PRINTTEXT)
+ _destSpriteX = destSpriteX;
_destSpriteY = destSpriteY;
_destSurface = destSurface;
_sourceSurface = sourceSurface;
- if (operation == DRAW_PRINTTEXT) {
- len = _fonts[_fontIndex]->getCharWidth();
- adjustCoords(1, &len, 0);
- _destSpriteX += len * strlen(_textToPrint);
- }
-
if ((_renderFlags & RENDERFLAG_USEDELTAS) && !deltaVeto) {
if (_sourceSurface == kBackSurface) {
_spriteLeft -= _backDeltaX;