aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2008-05-06 21:56:16 +0000
committerSven Hesse2008-05-06 21:56:16 +0000
commit9be06ad9e82226bad6c70fc37dcc7db390ce3778 (patch)
tree9b31377c01e38786069ba01094dc87dc31ea6da6 /engines
parent5abc85bd0e4e0801e7774e0f3efffcc6213ae88e (diff)
downloadscummvm-rg350-9be06ad9e82226bad6c70fc37dcc7db390ce3778.tar.gz
scummvm-rg350-9be06ad9e82226bad6c70fc37dcc7db390ce3778.tar.bz2
scummvm-rg350-9be06ad9e82226bad6c70fc37dcc7db390ce3778.zip
Fixed text positioning in Woodruff, enabling "Use FOO on BAR" texts.
svn-id: r31908
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/draw_v2.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index 8f7d5b325b..baca917877 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -246,22 +246,25 @@ void Draw_v2::printTotText(int16 id) {
}
if (_renderFlags & RENDERFLAG_FROMSPLIT) {
- destY = _vm->_video->_splitStart;
+ destY = _vm->_video->_splitHeight1;
spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2);
+
if (_renderFlags & RENDERFLAG_DOUBLECOORDS)
spriteBottom *= 3;
- spriteBottom += _vm->_video->_splitStart;
+
+ spriteBottom += _vm->_video->_splitHeight1;
+
if (_renderFlags & RENDERFLAG_DOUBLECOORDS) {
- spriteBottom += _backDeltaX;
- destY += _backDeltaX;
+ spriteBottom += _backDeltaY;
+ destY += _backDeltaY;
}
} else {
+ destY = READ_LE_UINT16(ptr + 2);
+ spriteBottom = READ_LE_UINT16(ptr + 6);
+
if (_renderFlags & RENDERFLAG_DOUBLECOORDS) {
- destY = READ_LE_UINT16(ptr + 2) * 2;
- spriteBottom = READ_LE_UINT16(ptr + 6) * 2;
- } else {
- destY = READ_LE_UINT16(ptr + 2);
- spriteBottom = READ_LE_UINT16(ptr + 6);
+ destY *= 2;
+ spriteBottom *= 2;
}
}
@@ -629,8 +632,7 @@ void Draw_v2::spriteOperation(int16 operation) {
_destSpriteX += _backDeltaX;
_destSpriteY += _backDeltaY;
if ((operation == DRAW_DRAWLINE) ||
- ((operation >= DRAW_DRAWBAR) &&
- (operation <= DRAW_FILLRECTABS))) {
+ ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS))) {
_spriteRight += _backDeltaX;
_spriteBottom += _backDeltaY;
}
@@ -646,6 +648,20 @@ void Draw_v2::spriteOperation(int16 operation) {
int16 destSurface = _destSurface;
int16 sourceSurface = _sourceSurface;
+ if ((_destSpriteY >= _vm->_video->_splitHeight1) &&
+ ((_destSurface == 20) || (_destSurface == 21))) {
+
+ _destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+ if ((operation == DRAW_DRAWLINE) ||
+ ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS)))
+ _spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+
+ }
+
+ if ((_spriteTop >= _vm->_video->_splitHeight1) && (operation == DRAW_BLITSURF) &&
+ ((_destSurface == 20) || (_destSurface == 21)))
+ _spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart;
+
adjustCoords(0, &_destSpriteX, &_destSpriteY);
if ((operation != DRAW_LOADSPRITE) && (_needAdjust != 2)) {
adjustCoords(0, &_spriteRight, &_spriteBottom);