aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.h
diff options
context:
space:
mode:
authorNicola Mettifogo2008-02-03 10:48:07 +0000
committerNicola Mettifogo2008-02-03 10:48:07 +0000
commit748a90ca23e4a6554af6bc440f2d27a224cfbfa4 (patch)
treeb6dd9075b787f1ce928ace43c52cb901ea279269 /engines/parallaction/graphics.h
parente51bf8021851d91f4904bd73263a455367d99b34 (diff)
downloadscummvm-rg350-748a90ca23e4a6554af6bc440f2d27a224cfbfa4.tar.gz
scummvm-rg350-748a90ca23e4a6554af6bc440f2d27a224cfbfa4.tar.bz2
scummvm-rg350-748a90ca23e4a6554af6bc440f2d27a224cfbfa4.zip
Added code to unpack and render animations in BRA.
svn-id: r30755
Diffstat (limited to 'engines/parallaction/graphics.h')
-rw-r--r--engines/parallaction/graphics.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 27598c2415..ce4cca0d1a 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -78,6 +78,8 @@ struct Frames {
virtual uint16 getNum() = 0;
virtual byte* getData(uint16 index) = 0;
virtual void getRect(uint16 index, Common::Rect &r) = 0;
+ virtual uint getRawSize(uint16 index) = 0;
+ virtual uint getSize(uint16 index) = 0;
virtual ~Frames() { }
@@ -110,6 +112,15 @@ public:
r.setWidth(_surf->w);
r.setHeight(_surf->h);
}
+ uint getRawSize(uint16 index) {
+ assert(index == 0);
+ return getSize(index);
+ }
+ uint getSize(uint16 index) {
+ assert(index == 0);
+ return _surf->w * _surf->h;
+ }
+
};
/*
@@ -144,6 +155,15 @@ struct SurfaceToMultiFrames : public Frames {
r.setWidth(_width);
r.setHeight(_height);
}
+ uint getRawSize(uint16 index) {
+ assert(index == 0);
+ return getSize(index);
+ }
+ uint getSize(uint16 index) {
+ assert(index == 0);
+ return _width * _height;
+ }
+
};
struct MaskBuffer {
@@ -284,6 +304,15 @@ public:
r.setWidth(_width);
r.setHeight(_height);
}
+ uint getRawSize(uint16 index) {
+ assert(index < _count);
+ return getSize(index);
+ }
+ uint getSize(uint16 index) {
+ assert(index < _count);
+ return _width * _height;
+ }
+
};
@@ -346,6 +375,9 @@ public:
uint getNum();
void getRect(uint frame, Common::Rect &r);
byte *getData(uint frame);
+ uint getRawSize(uint frame);
+ uint getSize(uint frame);
+
void setFlags(uint32 flags);
void clearFlags(uint32 flags);
@@ -540,6 +572,7 @@ protected:
void drawWrappedText(Graphics::Surface* surf, char *text, byte color, int16 wrapwidth);
void blt(const Common::Rect& r, byte *data, Graphics::Surface *surf, uint16 z, byte transparentColor);
+ void unpackBlt(const Common::Rect& r, byte *data, uint size, Graphics::Surface *surf, uint16 z, byte transparentColor);
};