diff options
author | Strangerke | 2014-11-23 23:44:12 +0100 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:40:26 -0500 |
commit | ddfe7395546e9b932280d7aae9e6455dbb4d9989 (patch) | |
tree | abff6ab05a3f0e62cc0f1ecd6c65585b3fc8bfa5 | |
parent | 74a61d1118df5c54b2ad75f6068328d8a6d54bec (diff) | |
download | scummvm-rg350-ddfe7395546e9b932280d7aae9e6455dbb4d9989.tar.gz scummvm-rg350-ddfe7395546e9b932280d7aae9e6455dbb4d9989.tar.bz2 scummvm-rg350-ddfe7395546e9b932280d7aae9e6455dbb4d9989.zip |
ACCESS: Implement copyVideo
-rw-r--r-- | engines/access/video.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/engines/access/video.cpp b/engines/access/video.cpp index 539ad34b8c..776c58a83b 100644 --- a/engines/access/video.cpp +++ b/engines/access/video.cpp @@ -141,6 +141,28 @@ void VideoPlayer::playVideo() { } void VideoPlayer::copyVideo() { - warning("TODO: copyVideo"); + _vm->_player->calcPlayer(); + Common::Rect r = Common::Rect(_vm->_vidX - _vm->_screen->_bufferStart.x, + _vm->_vidY - _vm->_screen->_bufferStart.y, + _vm->_vidX - _vm->_screen->_bufferStart.x + _header._width, + _vm->_vidY - _vm->_screen->_bufferStart.y + _header._height); + if (!_vm->_screen->clip(r)) + return; + + _vm->_newRects.push_back(r); + int vh = _header._height; + int vw = _header._width; + int destIdx = _vm->_vidX - _vm->_screen->_bufferStart.x; + int srcIdx = _vm->_screen->_leftSkip; + for (int i = 0; i < _vm->_screen->_topSkip; i++) + destIdx += 160; + + const byte *srcP = (const byte *)_vm->_vidBuf.getPixels() + srcIdx; + byte *destP = (byte *)_vm->_buffer2.getPixels() + destIdx; + for (int i = 0; i < vh; i++) { + Common::copy(srcP, srcP + vw, destP); + srcP += _vm->_vidBuf.pitch; + destP += _vm->_buffer2.pitch; + } } } // End of namespace Access |