diff options
author | David Corrales | 2007-08-05 19:34:20 +0000 |
---|---|---|
committer | David Corrales | 2007-08-05 19:34:20 +0000 |
commit | 6856535010bd2fa4449bcfde1c88dc06cd46e26f (patch) | |
tree | b81a2234c2beff0312c93e039d6cafda4babeca6 /engines/gob/video.cpp | |
parent | 1400d28bfb37fc94f3c44dec0a4d0cef65fb8fb7 (diff) | |
parent | ec1803f838d5efc7decf75c05a1fb4a9633751e5 (diff) | |
download | scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.gz scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.tar.bz2 scummvm-rg350-6856535010bd2fa4449bcfde1c88dc06cd46e26f.zip |
Merged fsnode with trunk: r27971:28460
svn-id: r28462
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) { |