aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r--engines/parallaction/graphics.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 6082f78343..3913eebbdf 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -72,7 +72,19 @@ public:
};
-struct Cnv {
+
+struct Frames {
+
+ virtual uint16 getNum() = 0;
+ virtual byte* getData(uint16 index) = 0;
+ virtual void getRect(uint16 index, Common::Rect &r) = 0;
+
+ virtual ~Frames() { }
+
+};
+
+
+struct Cnv : public Frames {
uint16 _count; // # of frames
uint16 _width; //
uint16 _height; //
@@ -99,6 +111,21 @@ public:
return NULL;
return &_data[index * _width * _height];
}
+
+ uint16 getNum() {
+ return _count;
+ }
+
+ byte *getData(uint16 index) {
+ return getFramePtr(index);
+ }
+
+ void getRect(uint16 index, Common::Rect &r) {
+ r.left = 0;
+ r.top = 0;
+ r.setWidth(_width);
+ r.setHeight(_height);
+ }
};
@@ -194,7 +221,7 @@ public:
// cut/paste
void flatBlitCnv(Graphics::Surface *cnv, int16 x, int16 y, Gfx::Buffers buffer);
- void flatBlitCnv(Cnv *cnv, uint16 frame, int16 x, int16 y, Gfx::Buffers buffer);
+ void flatBlitCnv(Frames *cnv, uint16 frame, int16 x, int16 y, Gfx::Buffers buffer);
void blitCnv(Graphics::Surface *cnv, int16 x, int16 y, uint16 z, Gfx::Buffers buffer);
void restoreBackground(const Common::Rect& r);
void backupDoorBackground(DoorData *data, int16 x, int16 y);
@@ -268,3 +295,4 @@ protected:
+