diff options
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/draw_v2.cpp | 24 | ||||
-rw-r--r-- | engines/gob/inter_v2.cpp | 23 |
2 files changed, 30 insertions, 17 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 8c429b1c1e..1195e35e93 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -245,13 +245,20 @@ void Draw_v2::printTotText(int16 id) { } if (_renderFlags & RENDERFLAG_FROMSPLIT) { - destY = _vm->_video->_splitHeight1; + int16 start; + + if (_vm->_video->_splitHeight1 < _vm->_height) + start = _vm->_video->_splitHeight1; + else + start = _vm->_video->_splitStart; + + destY = start; spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2); if (_renderFlags & RENDERFLAG_DOUBLECOORDS) spriteBottom *= 3; - spriteBottom += _vm->_video->_splitHeight1; + spriteBottom += start; if (_renderFlags & RENDERFLAG_DOUBLECOORDS) { spriteBottom += _backDeltaY; @@ -650,16 +657,19 @@ void Draw_v2::spriteOperation(int16 operation) { 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 (_vm->_video->_splitHeight1 < _vm->_height) { + _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; + if (_vm->_video->_splitHeight1 < _vm->_height) + _spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; adjustCoords(0, &_destSpriteX, &_destSpriteY); if ((operation != DRAW_LOADSPRITE) && (_needAdjust != 2)) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 6f261e9822..493efa8438 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1444,19 +1444,22 @@ void Inter_v2::o2_initScreen() { int16 screenHeight = _vm->_video->_surfHeight; - _vm->_video->_surfHeight += offY; + if (screenHeight < _vm->_height) { + _vm->_video->_surfHeight += offY; + _vm->_video->_splitStart = screenHeight; + } else + _vm->_video->_splitStart = screenHeight - offY; - _vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, screenHeight - offY); - _vm->_video->_splitHeight2 = offY; - _vm->_video->_splitStart = screenHeight; + _vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, screenHeight - offY); + _vm->_video->_splitHeight2 = offY; - if ((_vm->_video->_surfHeight + offY) < _vm->_height) - _vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2; - else - _vm->_video->_screenDeltaY = 0; + if ((_vm->_video->_surfHeight + offY) < _vm->_height) + _vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2; + else + _vm->_video->_screenDeltaY = 0; - _vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1; - _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY; + _vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1; + _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY; } else { _vm->_video->_splitHeight1 = MIN<int16>(_vm->_height, _vm->_video->_surfHeight - offY); |