diff options
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r-- | engines/parallaction/graphics.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index 2bc17f0b77..7eacff4f5d 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -84,6 +84,36 @@ struct Frames { }; +struct SurfaceToFrames : public Frames { + + Graphics::Surface *_surf; + +public: + SurfaceToFrames(Graphics::Surface *surf) : _surf(surf) { + } + + ~SurfaceToFrames() { + delete _surf; + } + + uint16 getNum() { + return 1; + } + byte* getData(uint16 index) { + assert(index == 0); + return (byte*)_surf->getBasePtr(0,0); + } + void getRect(uint16 index, Common::Rect &r) { + assert(index == 0); + r.left = 0; + r.top = 0; + r.setWidth(_surf->w); + r.setHeight(_surf->h); + } + + +}; + struct Cnv : public Frames { uint16 _count; // # of frames uint16 _width; // |