aboutsummaryrefslogtreecommitdiff
path: root/graphics/video/coktel_decoder.h
diff options
context:
space:
mode:
authorSven Hesse2010-08-08 00:39:03 +0000
committerSven Hesse2010-08-08 00:39:03 +0000
commitf7363fdb10675bf27c1a1d37d23a25590bdc344c (patch)
treef439caf375108dd25a9c2fe11a296ce225d8b4ca /graphics/video/coktel_decoder.h
parent12c9e895b559d1ca2780b5b8f156b0451eb11f11 (diff)
downloadscummvm-rg350-f7363fdb10675bf27c1a1d37d23a25590bdc344c.tar.gz
scummvm-rg350-f7363fdb10675bf27c1a1d37d23a25590bdc344c.tar.bz2
scummvm-rg350-f7363fdb10675bf27c1a1d37d23a25590bdc344c.zip
VIDEO/GOB: Add CoktelDecoder::getDirtyRects()
This allows for the client code to only update the parts of the video frames that actually changed. svn-id: r51859
Diffstat (limited to 'graphics/video/coktel_decoder.h')
-rw-r--r--graphics/video/coktel_decoder.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h
index a4d12c5294..ea405974d6 100644
--- a/graphics/video/coktel_decoder.h
+++ b/graphics/video/coktel_decoder.h
@@ -33,6 +33,9 @@
#ifndef GRAPHICS_VIDEO_COKTELDECODER_H
#define GRAPHICS_VIDEO_COKTELDECODER_H
+#include "common/list.h"
+#include "common/rect.h"
+
#include "graphics/video/video_decoder.h"
#include "sound/mixer.h"
@@ -42,14 +45,6 @@ namespace Graphics {
class CoktelDecoder : public FixedRateVideoDecoder {
public:
struct State {
- /** Left-most value of the updated rectangle. */
- int16 left;
- /** Top-most value of the updated rectangle. */
- int16 top;
- /** Right-most value of the updated rectangle. */
- int16 right;
- /** Bottom-most value of the updated rectangle. */
- int16 bottom;
/** Set accordingly to what was done. */
uint32 flags;
/** The id of the spoken words. */
@@ -72,6 +67,9 @@ public:
/** Draw the video starting at this position within the video memory. */
void setXY(uint16 x, uint16 y);
+ /** Return a list of rectangles that changed in the last frame. */
+ const Common::List<Common::Rect> &getDirtyRects() const;
+
// VideoDecoder interface
void close();
@@ -102,6 +100,8 @@ protected:
bool _ownSurface;
Surface _surface;
+ Common::List<Common::Rect> _dirtyRects;
+
Common::Rational _frameRate;
bool hasSurface();