From c45f149ea181c97a1dcacd9f89231d2fe396791b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 16 Dec 2008 02:57:48 +0000 Subject: [PATCH] First step at getting the magnifier and memory view corrected svn-id: r35389 --- engines/gob/coktelvideo.cpp | 1 + engines/gob/videoplayer.cpp | 19 +++++++++++++++++-- engines/gob/videoplayer.h | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index 5ce7f20db80..7b5ef8a5c50 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -1522,6 +1522,7 @@ void Vmd::blit(byte *dest, byte *src, int16 width, int16 height) { void Vmd::blit16(byte *dest, uint16 *src, int16 width, int16 height) { int16 vWidth = _width >> 1; + width >>= 1; assert(_palLUT); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 0285bf20149..4fa07af5dc7 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -247,10 +247,25 @@ bool VideoPlayer::primaryOpen(const char *videoFile, int16 x, int16 y, } if (!(flags & kFlagNoVideo)) { - _backSurf = ((flags & kFlagFrontSurface) == 0); - SurfaceDesc::Ptr surf = _vm->_draw->_spritesArray[_backSurf ? 21 : 20]; + SurfaceDesc::Ptr surf; + + if (flags & kFlagOtherSurface) { + _backSurf = false; + + surf = _vm->_video->initSurfDesc(_vm->_global->_videoMode, + _primaryVideo->getVideo()->getWidth(), + _primaryVideo->getVideo()->getHeight(), 0); + _vm->_draw->_spritesArray[x] = surf; + + x = 0; + } else { + _backSurf = ((flags & kFlagFrontSurface) == 0); + surf = _vm->_draw->_spritesArray[_backSurf ? 21 : 20]; + } + _primaryVideo->getVideo()->setVideoMemory(surf->getVidMem(), surf->getWidth(), surf->getHeight()); + } else _primaryVideo->getVideo()->setVideoMemory(); diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index a0617ca52fa..65d1e2b2cf8 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -41,7 +41,8 @@ public: kFlagNone = 0, kFlagUseBackSurfaceContent = 0x40, kFlagFrontSurface = 0x80, - kFlagNoVideo = 0x100 + kFlagNoVideo = 0x100, + kFlagOtherSurface = 0x800 }; enum Type {