aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.h
diff options
context:
space:
mode:
authorNicola Mettifogo2007-11-22 21:51:33 +0000
committerNicola Mettifogo2007-11-22 21:51:33 +0000
commit919c0a2833273d3ae92d0eb3635a479c34e1ced9 (patch)
tree66cdf8a6d46da4e6a57e7e64351ba43c6671b9cc /engines/parallaction/graphics.h
parentf4946e64008ebebcbba340c7b0d51ad466219e85 (diff)
downloadscummvm-rg350-919c0a2833273d3ae92d0eb3635a479c34e1ced9.tar.gz
scummvm-rg350-919c0a2833273d3ae92d0eb3635a479c34e1ced9.tar.bz2
scummvm-rg350-919c0a2833273d3ae92d0eb3635a479c34e1ced9.zip
* 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
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r--engines/parallaction/graphics.h30
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; //