aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus
diff options
context:
space:
mode:
authorMatthew Hoops2011-10-08 00:13:14 -0400
committerMatthew Hoops2011-10-08 00:13:14 -0400
commit188d951cb4d040056098fc0d65ae8f9544a2fdfc (patch)
tree5b8a702a4bbc4cf0fcb769885f29932ea3d662c5 /engines/pegasus
parent8a717d28d82b0cd48a9dfdacd7686d88abcc09f2 (diff)
downloadscummvm-rg350-188d951cb4d040056098fc0d65ae8f9544a2fdfc.tar.gz
scummvm-rg350-188d951cb4d040056098fc0d65ae8f9544a2fdfc.tar.bz2
scummvm-rg350-188d951cb4d040056098fc0d65ae8f9544a2fdfc.zip
PEGASUS: Remove unused movie direct draw mode
Diffstat (limited to 'engines/pegasus')
-rwxr-xr-xengines/pegasus/movie.cpp26
-rwxr-xr-xengines/pegasus/movie.h13
2 files changed, 11 insertions, 28 deletions
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<int>(frame->w, _movieBox.width());
- uint16 height = MIN<int>(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<int>(frame->w, _movieBox.width());
+ uint16 height = MIN<int>(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;
};