From 919c0a2833273d3ae92d0eb3635a479c34e1ced9 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 22 Nov 2007 21:51:33 +0000 Subject: * added adapter from Graphics::Surface to Frames * changed all Disk routines to return Frames* instead of Graphics::Surface* * changed displayItemComment to use new gfx routines * merged code for Examine zones into displayComment svn-id: r29615 --- engines/parallaction/graphics.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'engines/parallaction/graphics.h') 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; // -- cgit v1.2.3