diff options
Diffstat (limited to 'engines/gob/video.cpp')
-rw-r--r-- | engines/gob/video.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 3034a38079..d2fe979754 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -86,10 +86,14 @@ void SurfaceDesc::swap(SurfaceDesc &surf) { Video::Video(GobEngine *vm) : _vm(vm) { _doRangeClamp = false; _videoDriver = 0; + _surfWidth = 320; _surfHeight = 200; + _scrollOffsetX = 0; _scrollOffsetY = 0; + + _splitSurf = 0; _splitHeight1 = 200; _splitHeight2 = 0; _splitStart = 0; @@ -184,7 +188,19 @@ void Video::retrace(bool mouse) { g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); - if (_splitHeight2 > 0) { + if (_splitSurf) { + + screenOffset = 0; + screenX = 0; + screenY = _vm->_height - _splitSurf->getHeight(); + screenWidth = MIN<int>(_vm->_width, _splitSurf->getWidth()); + screenHeight = _splitSurf->getHeight(); + + g_system->copyRectToScreen(_splitSurf->getVidMem() + screenOffset, + _splitSurf->getWidth(), screenX, screenY, screenWidth, screenHeight); + + } else if (_splitHeight2 > 0) { + screenOffset = _splitStart * _surfWidth; screenX = 0; screenY = _vm->_height - _splitHeight2; @@ -193,6 +209,7 @@ void Video::retrace(bool mouse) { g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); + } g_system->updateScreen(); |