aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.cpp
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.cpp
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.cpp')
-rw-r--r--engines/parallaction/graphics.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 59447c3974..dd5ae4349b 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -422,6 +422,30 @@ void Gfx::invertBackground(const Common::Rect& r) {
}
+byte _unpackedBitmap[320*200];
+
+void Gfx::unpackBlt(const Common::Rect& r, byte *data, uint size, Graphics::Surface *surf, uint16 z, byte transparentColor) {
+
+ byte *d = _unpackedBitmap;
+
+ while (size > 0) {
+
+ uint8 p = *data++;
+ size--;
+ uint8 color = p & 0xF;
+ uint8 repeat = (p & 0xF0) >> 4;
+ if (repeat == 0) {
+ repeat = *data++;
+ size--;
+ }
+
+ memset(d, color, repeat);
+ d += repeat;
+ }
+
+ blt(r, _unpackedBitmap, surf, z, transparentColor);
+}
+
void Gfx::blt(const Common::Rect& r, byte *data, Graphics::Surface *surf, uint16 z, byte transparentColor) {
Common::Point dp;