From 188d951cb4d040056098fc0d65ae8f9544a2fdfc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 8 Oct 2011 00:13:14 -0400 Subject: PEGASUS: Remove unused movie direct draw mode --- engines/pegasus/movie.cpp | 26 ++++++-------------------- engines/pegasus/movie.h | 13 +++++-------- 2 files changed, 11 insertions(+), 28 deletions(-) (limited to 'engines') diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp index ec1b033cfd..c3cfbfdd5d 100755 --- a/engines/pegasus/movie.cpp +++ b/engines/pegasus/movie.cpp @@ -34,7 +34,6 @@ namespace Pegasus { Movie::Movie(const tDisplayElementID id) : Animation(id) { _video = 0; - _directDraw = false; setScale(600); } @@ -50,7 +49,6 @@ void Movie::releaseMovie() { _video = 0; disposeAllCallBacks(); deallocateSurface(); - // TODO: Decrease global direct draw counter } } @@ -75,11 +73,6 @@ void Movie::initFromMovieFile(const Common::String &fileName, bool transparent) setStop(_video->getDuration() * getScale() / 1000, getScale()); } -void Movie::setDirectDraw(const bool flag) { - _directDraw = flag; - // TODO: Increase/decrease the global direct draw counter -} - void Movie::redrawMovieWorld() { if (_video) { const Graphics::Surface *frame = _video->decodeNextFrame(); @@ -87,19 +80,12 @@ void Movie::redrawMovieWorld() { if (!frame) return; - if (_directDraw) { - // Copy to the screen - Common::Rect bounds; - getBounds(bounds); - g_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, bounds.left, bounds.top, frame->w, frame->h); - } else { - // Copy to the surface using _movieBox - uint16 width = MIN(frame->w, _movieBox.width()); - uint16 height = MIN(frame->h, _movieBox.height()); - - for (uint16 y = 0; y < height; y++) - memcpy((byte *)_surface->getBasePtr(_movieBox.left, _movieBox.top + y), (const byte *)frame->getBasePtr(0, y), width * frame->format.bytesPerPixel); - } + // Copy to the surface using _movieBox + uint16 width = MIN(frame->w, _movieBox.width()); + uint16 height = MIN(frame->h, _movieBox.height()); + + for (uint16 y = 0; y < height; y++) + memcpy((byte *)_surface->getBasePtr(_movieBox.left, _movieBox.top + y), (const byte *)frame->getBasePtr(0, y), width * frame->format.bytesPerPixel); triggerRedraw(); } diff --git a/engines/pegasus/movie.h b/engines/pegasus/movie.h index 31b567407f..12d1af97d3 100755 --- a/engines/pegasus/movie.h +++ b/engines/pegasus/movie.h @@ -45,18 +45,16 @@ public: virtual void initFromMovieFile(const Common::String &fileName, bool transparent = false); bool isMovieValid() { return _video != 0; } - + virtual void releaseMovie(); - + virtual void draw(const Common::Rect &); virtual void redrawMovieWorld(); - - void setDirectDraw(const bool); - + virtual void setTime(const TimeValue, const TimeScale = 0); - + virtual void setRate(const Common::Rational); - + virtual void start(); virtual void stop(); virtual void resume(); @@ -74,7 +72,6 @@ public: protected: Video::SeekableVideoDecoder *_video; - bool _directDraw; Common::Rect _movieBox; }; -- cgit v1.2.3