aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2010-08-08 00:53:55 +0000
committerSven Hesse2010-08-08 00:53:55 +0000
commit3c5e02900f6397add6365bea819987bf9d6e89e6 (patch)
tree54eedd8799b58b17d2832e0f4183b7b9656eeb19
parent3295d6ec6ba15afa8d6f1118e916c40ad9bd2f72 (diff)
downloadscummvm-rg350-3c5e02900f6397add6365bea819987bf9d6e89e6.tar.gz
scummvm-rg350-3c5e02900f6397add6365bea819987bf9d6e89e6.tar.bz2
scummvm-rg350-3c5e02900f6397add6365bea819987bf9d6e89e6.zip
VIDEO: Add getSurface
svn-id: r51892
-rw-r--r--graphics/video/coktel_decoder.cpp7
-rw-r--r--graphics/video/coktel_decoder.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index 629e01c2b5..8e8c6f9e93 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -71,6 +71,13 @@ void CoktelDecoder::setSurfaceMemory() {
_ownSurface = true;
}
+const Surface *CoktelDecoder::getSurface() const {
+ if (!isVideoLoaded())
+ return 0;
+
+ return &_surface;
+}
+
bool CoktelDecoder::hasSurface() {
return _surface.pixels != 0;
}
diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h
index 8bba71ebcd..646e55b0bc 100644
--- a/graphics/video/coktel_decoder.h
+++ b/graphics/video/coktel_decoder.h
@@ -68,6 +68,8 @@ public:
/** Reset the video memory. */
void setSurfaceMemory();
+ const Surface *getSurface() const;
+
/** Draw the video starting at this position within the video memory. */
virtual void setXY(uint16 x, uint16 y);
/** Draw the video at the default position. */