aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2004-10-04 13:49:30 +0000
committerEugene Sandulenko2004-10-04 13:49:30 +0000
commit1cb05366f8b3e59b450e57a02ee8e3966d0ddee0 (patch)
tree40f0907f42c25e9bbd326d9afb59a7e308348645 /scumm
parent460212697a66ef711df40ed1c0c8114e1d875c8c (diff)
downloadscummvm-rg350-1cb05366f8b3e59b450e57a02ee8e3966d0ddee0.tar.gz
scummvm-rg350-1cb05366f8b3e59b450e57a02ee8e3966d0ddee0.tar.bz2
scummvm-rg350-1cb05366f8b3e59b450e57a02ee8e3966d0ddee0.zip
Implement case 150 for drawBMAPBg
svn-id: r15408
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp16
-rw-r--r--scumm/gfx.h1
2 files changed, 16 insertions, 1 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 5962fe20c2..b1d106bf1c 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1396,7 +1396,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs, int startstrip) {
// for an area spanning multiple strips. In particular, the codecs 13 & 14
// in decompressBitmap call drawStripHE()
if (code == 150) {
- warning("drawBMAPBg: case 150 unhandled");
+ fillRect((byte *)vs->backBuf, vs->pitch, 0, 0, vs->w - 1, vs->h - 1, *bmap_ptr);
} else if ((code >= 134 && code <= 138) || (code >= 144 && code <= 148)) {
_decomp_shr = code % 10;
_decomp_mask = 0xFF >> (8 - _decomp_shr);
@@ -2174,6 +2174,20 @@ void Gdi::drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int h
}
}
+void Gdi::fillRect(byte *dst, int pitch, int x1, int y1, int x2, int y2, byte color) {
+ int w, h;
+ byte *ptr = dst + x1 + y1 * pitch;
+
+ w = x2 - x1 + 1;
+ h = y2 - y1 + 1;
+
+ for (int i = 0; i < h; i++) {
+ memset(ptr, color, w);
+ ptr += pitch;
+ }
+}
+
+
#undef READ_BIT
#undef FILL_BITS
diff --git a/scumm/gfx.h b/scumm/gfx.h
index bf04918938..d2aae0dacb 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -249,6 +249,7 @@ protected:
void drawStrip3DO(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const;
void drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int height, const bool transpCheck) const;
+ void fillRect(byte *dst, int dstPitch, int x1, int y1, int x2, int y2, byte color);
/* Mask decompressors */
void drawStripC64Mask(byte *dst, int stripnr, int width, int height) const;