diff options
Diffstat (limited to 'engines/gob/video.cpp')
-rw-r--r-- | engines/gob/video.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 6f88a5a993..0dc15a8657 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -94,6 +94,7 @@ Video::Video(GobEngine *vm) : _vm(vm) { _splitHeight1 = 200; _splitHeight2 = 0; _splitStart = 0; + _lastRetraceLength = 0; _curSparse = 0; _lastSparse = 0xFFFFFFFF; @@ -161,26 +162,27 @@ SurfaceDesc *Video::initSurfDesc(int16 vidMode, int16 width, int16 height, } void Video::retrace(bool mouse) { + uint32 time = _vm->_util->getTimeKey(); + if (mouse) CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0); if (_vm->_global->_primarySurfDesc) { g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + _scrollOffsetY * _surfWidth + _scrollOffsetX, _surfWidth, - 0, 0, 320, _splitHeight1); + 0, 0, _vm->_width, _splitHeight1); if (_splitHeight2 > 0) g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + _splitStart * _surfWidth, _surfWidth, 0, - 200 - _splitHeight2, 320, _splitHeight2); + _vm->_height - _splitHeight2, _vm->_width, _splitHeight2); g_system->updateScreen(); } + + _lastRetraceLength = _vm->_util->getTimeKey() - time; } void Video::waitRetrace(bool mouse) { - uint32 time; - - time = _vm->_util->getTimeKey(); retrace(mouse); - _vm->_util->delay(MAX(1, 10 - (int)(_vm->_util->getTimeKey() - time))); + _vm->_util->delay(MAX(1, 10 - (int) _lastRetraceLength)); } void Video::sparseRetrace(int max) { |